Browse Source

add job and sunaccount database table

Xingyu Xian 8 months ago
parent
commit
e3d5ff2c8a
2 changed files with 29 additions and 0 deletions
  1. 16 0
      model/gorm_model/job.go
  2. 13 0
      model/gorm_model/subaccount.go

+ 16 - 0
model/gorm_model/job.go

@@ -0,0 +1,16 @@
+package gorm_model
+
+type YounggeeJob struct {
+	JobId                int    `gorm:"column:sub_account_id;primary_key;AUTO_INCREMENT"` // 子账号ID
+	JobName              string `gorm:"column:job_name"`                                  // 岗位名称
+	JobDetail            string `gorm:"column:job_detail"`                                // 岗位描述
+	WorkshopPermission   string `gorm:"column:workshop_permission"`                       // 工作台权限
+	TaskcenterPermission string `gorm:"column:taskcenter_permission"`                     // 任务中心权限
+	CoopratePermission   string `gorm:"column:cooprate_permission"`                       // 推广合作权限
+	FinancialPermission  string `gorm:"column:financial_permission"`                      // 财务结算权限
+	EnterpriseId         string `gorm:"column:enterprise_id"`                             // 岗位所属商家账号ID
+}
+
+func (m *YounggeeJob) TableName() string {
+	return "younggee_job"
+}

+ 13 - 0
model/gorm_model/subaccount.go

@@ -0,0 +1,13 @@
+package gorm_model
+
+type YounggeeSubAccount struct {
+	SubAccountId   int    `gorm:"column:sub_account_id;primary_key;AUTO_INCREMENT"` // 子账号ID
+	PhoneNumber    int    `gorm:"column:phone_number"`                              // 手机号
+	SubAccountName string `gorm:"column:sub_account_name"`                          // 子账号名称
+	JobId          int    `gorm:"column:job_id"`                                    // 岗位ID
+	EnterpriseId   string `gorm:"column:enterprise_id"`                             // 所属商家账号ID
+}
+
+func (m *YounggeeSubAccount) TableName() string {
+	return "younggee_sub_account"
+}