// Code generated by db2go. DO NOT EDIT.
// https://github.com/civet148/sqlca

package models

const TableNameCustomer = "customer" //客户信息表

const (
	CUSTOMER_COLUMN_ID            = "id"
	CUSTOMER_COLUMN_USER_NAME     = "user_name"
	CUSTOMER_COLUMN_USER_ALIAS    = "user_alias"
	CUSTOMER_COLUMN_REFERRER	  = "referrer"
	CUSTOMER_COLUMN_REFERRAL_CODE = "referral_code"
	CUSTOMER_COLUMN_PASSWORD      = "password"
	CUSTOMER_COLUMN_FIRST_NAME    = "first_name"
	CUSTOMER_COLUMN_LAST_NAME     = "last_name"
	CUSTOMER_COLUMN_TITLE         = "title"
	CUSTOMER_COLUMN_COMPANY       = "company"
	CUSTOMER_COLUMN_SALT          = "salt"
	CUSTOMER_COLUMN_PHONE_NUMBER  = "phone_number"
	CUSTOMER_COLUMN_IS_ADMIN      = "is_admin"
	CUSTOMER_COLUMN_EMAIL         = "email"
	CUSTOMER_COLUMN_ADDRESS       = "address"
	CUSTOMER_COLUMN_REMARK        = "remark"
	CUSTOMER_COLUMN_DELETED       = "deleted"
	CUSTOMER_COLUMN_STATE         = "state"
	CUSTOMER_COLUMN_IS_SUBSCRIBED = "is_subscribed"
	CUSTOMER_COLUMN_LOGIN_IP      = "login_ip"
	CUSTOMER_COLUMN_LOGIN_TIME    = "login_time"
	CUSTOMER_COLUMN_CREATE_USER   = "create_user"
	CUSTOMER_COLUMN_EDIT_USER     = "edit_user"
	CUSTOMER_COLUMN_CREATED_TIME  = "created_time"
	CUSTOMER_COLUMN_UPDATED_TIME  = "updated_time"
	CUSTOMER_COLUMN_EXTRA_DATA    = "extra_data"
)

type CustomerDO struct {
	Id           int32    `json:"id" db:"id" bson:"_id"`                                               //用户ID(自增)
	UserName     string   `json:"user_name" db:"user_name" bson:"user_name"`                           //登录名称
	UserAlias    string   `json:"user_alias" db:"user_alias" bson:"user_alias"`                        //账户别名
	Password     string   `json:"password" db:"password" bson:"password"`                              //登录密码(MD5+SALT)
	Referrer     string   `json:"referrer" db:"referrer" bson:"referrer"`                              //推荐人
	ReferralCode string   `json:"referral_code" db:"referral_code" bson:"referral_code"`               //推荐码
	FirstName    string   `json:"first_name" db:"first_name" bson:"first_name"`                        //姓
	LastName     string   `json:"last_name" db:"last_name" bson:"last_name"`                           //名
	Title        string   `json:"title" db:"title" bson:"title"`                                       //职称
	Company      string   `json:"company" db:"company" bson:"company"`                                 //公司名称
	Salt         string   `json:"salt" db:"salt" bson:"salt"`                                          //MD5加密盐
	PhoneNumber  string   `json:"phone_number" db:"phone_number" bson:"phone_number"`                  //联系手机号
	IsAdmin      bool     `json:"is_admin" db:"is_admin" bson:"is_admin"`                              //是否为超级管理员(0=普通账户 1=超级管理员)
	Email        string   `json:"email" db:"email" sqlca:"isnull" bson:"email"`                        //邮箱地址
	Address      string   `json:"address" db:"address" bson:"address"`                                 //家庭住址/公司地址
	Remark       string   `json:"remark" db:"remark" bson:"remark"`                                    //备注
	Deleted      bool     `json:"deleted" db:"deleted" bson:"deleted"`                                 //是否已删除(0=未删除 1=已删除)
	State        int8     `json:"state" db:"state" bson:"state"`                                       //是否已冻结(1=已启用 2=已冻结)
	IsSubscribed bool     `json:"is_subscribed" db:"is_subscribed" bson:"is_subscribed"`               //是否已订阅(0=未订阅 1=已订阅)
	LoginIp      string   `json:"login_ip" db:"login_ip" bson:"login_ip"`                              //最近登录IP
	LoginTime    int64    `json:"login_time" db:"login_time" bson:"login_time"`                        //最近登录时间
	CreateUser   string   `json:"create_user" db:"create_user" bson:"create_user"`                     //创建人
	EditUser     string   `json:"edit_user" db:"edit_user" bson:"edit_user"`                           //最近编辑人
	CreatedTime  string   `json:"created_time" db:"created_time" sqlca:"readonly" bson:"created_time"` //创建时间
	UpdatedTime  string   `json:"updated_time" db:"updated_time" sqlca:"readonly" bson:"updated_time"` //更新时间
	ExtraData    struct{} `json:"extra_data" db:"extra_data" sqlca:"isnull" bson:"extra_data"`         //附带数据(JSON)
}

func (do *CustomerDO) GetId() int32            { return do.Id }
func (do *CustomerDO) SetId(v int32)           { do.Id = v }
func (do *CustomerDO) GetUserName() string     { return do.UserName }
func (do *CustomerDO) SetUserName(v string)    { do.UserName = v }
func (do *CustomerDO) GetUserAlias() string    { return do.UserAlias }
func (do *CustomerDO) SetUserAlias(v string)   { do.UserAlias = v }
func (do *CustomerDO) GetPassword() string     { return do.Password }
func (do *CustomerDO) SetPassword(v string)    { do.Password = v }
func (do *CustomerDO) GetFirstName() string    { return do.FirstName }
func (do *CustomerDO) SetFirstName(v string)   { do.FirstName = v }
func (do *CustomerDO) GetLastName() string     { return do.LastName }
func (do *CustomerDO) SetLastName(v string)    { do.LastName = v }
func (do *CustomerDO) GetTitle() string        { return do.Title }
func (do *CustomerDO) SetTitle(v string)       { do.Title = v }
func (do *CustomerDO) GetCompany() string      { return do.Company }
func (do *CustomerDO) SetCompany(v string)     { do.Company = v }
func (do *CustomerDO) GetSalt() string         { return do.Salt }
func (do *CustomerDO) SetSalt(v string)        { do.Salt = v }
func (do *CustomerDO) GetPhoneNumber() string  { return do.PhoneNumber }
func (do *CustomerDO) SetPhoneNumber(v string) { do.PhoneNumber = v }
func (do *CustomerDO) GetIsAdmin() bool        { return do.IsAdmin }
func (do *CustomerDO) SetIsAdmin(v bool)       { do.IsAdmin = v }
func (do *CustomerDO) GetEmail() string        { return do.Email }
func (do *CustomerDO) SetEmail(v string)       { do.Email = v }
func (do *CustomerDO) GetAddress() string      { return do.Address }
func (do *CustomerDO) SetAddress(v string)     { do.Address = v }
func (do *CustomerDO) GetRemark() string       { return do.Remark }
func (do *CustomerDO) SetRemark(v string)      { do.Remark = v }
func (do *CustomerDO) GetDeleted() bool        { return do.Deleted }
func (do *CustomerDO) SetDeleted(v bool)       { do.Deleted = v }
func (do *CustomerDO) GetState() int8          { return do.State }
func (do *CustomerDO) SetState(v int8)         { do.State = v }
func (do *CustomerDO) GetIsSubscribed() bool   { return do.IsSubscribed }
func (do *CustomerDO) SetIsSubscribed(v bool)  { do.IsSubscribed = v }
func (do *CustomerDO) GetLoginIp() string      { return do.LoginIp }
func (do *CustomerDO) SetLoginIp(v string)     { do.LoginIp = v }
func (do *CustomerDO) GetLoginTime() int64     { return do.LoginTime }
func (do *CustomerDO) SetLoginTime(v int64)    { do.LoginTime = v }
func (do *CustomerDO) GetCreateUser() string   { return do.CreateUser }
func (do *CustomerDO) SetCreateUser(v string)  { do.CreateUser = v }
func (do *CustomerDO) GetEditUser() string     { return do.EditUser }
func (do *CustomerDO) SetEditUser(v string)    { do.EditUser = v }
func (do *CustomerDO) GetCreatedTime() string  { return do.CreatedTime }
func (do *CustomerDO) SetCreatedTime(v string) { do.CreatedTime = v }
func (do *CustomerDO) GetUpdatedTime() string  { return do.UpdatedTime }
func (do *CustomerDO) SetUpdatedTime(v string) { do.UpdatedTime = v }
func (do *CustomerDO) GetExtraData() struct{}  { return do.ExtraData }
func (do *CustomerDO) SetExtraData(v struct{}) { do.ExtraData = v }

/*
CREATE TABLE `customer` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '用户ID(自增)',
  `user_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '登录名称',
  `user_alias` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '账户别名',
  `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '登录密码(MD5+SALT)',
  `first_name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '姓',
  `last_name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名',
  `title` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '职称',
  `company` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '公司名称',
  `salt` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'MD5加密盐',
  `phone_number` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '联系手机号',
  `is_admin` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为超级管理员(0=普通账户 1=超级管理员)',
  `email` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '邮箱地址',
  `address` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '家庭住址/公司地址',
  `remark` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已删除(0=未删除 1=已删除)',
  `state` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已冻结(1=已启用 2=已冻结)',
  `is_subscribed` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已订阅(0=未订阅 1=已订阅)',
  `login_ip` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '最近登录IP',
  `login_time` bigint NOT NULL DEFAULT '0' COMMENT '最近登录时间',
  `create_user` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建人',
  `edit_user` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '最近编辑人',
  `created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updated_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `extra_data` json DEFAULT NULL COMMENT '附带数据(JSON)',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `UNIQ_USER_NAME` (`user_name`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='客户信息表';
*/
