add apis
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"lone-services/pkg/utils"
|
||||
)
|
||||
|
||||
type AuthorizationRecordInfo struct {
|
||||
Id int64 `gorm:"column:id;type:int;not null;autoIncrement" json:"id"`
|
||||
StoreId int64 `gorm:"column:store_id;type:int;not null" json:"store_id"` // 美容院ID
|
||||
UserId int64 `gorm:"column:user_id;type:int;not null" json:"user_id"` // 用户ID
|
||||
Datetime utils.CustomTime `gorm:"column:datetime;type:datetime;default:NULL" json:"datetime"` // 绑定时间
|
||||
Status int32 `gorm:"column:status;type:tinyint;default:1" json:"status"` // 2未授权 1 已授权
|
||||
Open int32 `gorm:"column:open;type:tinyint(1);not null;default:1" json:"open"` // 是否开启展示,1为默认开启,2为关闭
|
||||
CreateAt utils.CustomTime `gorm:"column:create_at;type:datetime;default:CURRENT_TIMESTAMP" json:"create_at"` // 创建时间
|
||||
|
||||
}
|
||||
|
||||
type AuthorizationRecordCreate struct {
|
||||
Id int64 `gorm:"column:id;type:int;not null;autoIncrement" json:"id"`
|
||||
StoreId int64 `gorm:"column:store_id;type:int;not null" json:"store_id"` // 美容院ID
|
||||
UserId int64 `gorm:"column:user_id;type:int;not null" json:"user_id"` // 用户ID
|
||||
Datetime utils.CustomTime `gorm:"column:datetime;type:datetime;default:NULL" json:"datetime"` // 绑定时间
|
||||
Status int32 `gorm:"column:status;type:tinyint;default:1" json:"status"` // 2未授权 1 已授权
|
||||
Open int32 `gorm:"column:open;type:tinyint(1);not null;default:1" json:"open"` // 是否开启展示,1为默认开启,2为关闭
|
||||
}
|
||||
|
||||
type AuthorizationRecordItems struct {
|
||||
Id int64 `json:"id"`
|
||||
StoreId int64 `json:"store_id"` // 美容院ID
|
||||
Status int32 `json:"status"` // 2未授权 1 已授权
|
||||
Open int32 `json:"open"` // 是否开启展示,1为默认开启,2为关闭
|
||||
StoreName string `json:"store_name"`
|
||||
District string `json:"district"`
|
||||
Address string `json:"address"`
|
||||
DistrictArr []int64 `json:"district_arr"`
|
||||
UsageCount int32 `json:"usage_count"`
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"lone-services/pkg/utils"
|
||||
)
|
||||
|
||||
const CodeName = "bind:code:"
|
||||
|
||||
type CodeBindInfo struct {
|
||||
Id int64 `gorm:"column:id;type:int;not null;autoIncrement" json:"id"` // ID
|
||||
UserId int64 `gorm:"column:user_id;type:int;default:0" json:"user_id"` // 用户ID
|
||||
Step int32 `gorm:"column:step;type:tinyint;default:1" json:"step"` // 步骤
|
||||
Bluetooth string `gorm:"column:bluetooth;type:char(30);not null;default:''" json:"bluetooth"` // 蓝牙
|
||||
Cmos string `gorm:"column:cmos;type:char(30);not null;default:''" json:"cmos"` // 芯片
|
||||
Status int32 `gorm:"column:status;type:tinyint(1);default:1" json:"status"` // 装态。1为正常,2为删除
|
||||
Type int32 `gorm:"column:type;type:tinyint(1);default:1" json:"type"` // 类型,1为园屏,2为卵型屏
|
||||
CreateTime utils.CustomTime `gorm:"column:create_time;type:datetime;default:CURRENT_TIMESTAMP" json:"create_time"` // 添加时间
|
||||
UpdateTime utils.CustomTime `gorm:"column:update_time;type:datetime;default:CURRENT_TIMESTAMP;onUpdate:CURRENT_TIMESTAMP" json:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
type CodeBindCreate struct {
|
||||
Id int64 `gorm:"column:id;type:int;not null;autoIncrement" json:"id"` // ID
|
||||
UserId int64 `gorm:"column:user_id;type:int;default:0" json:"user_id"` // 用户ID
|
||||
Step int32 `gorm:"column:step;type:tinyint;default:1" json:"step"` // 步骤
|
||||
Bluetooth string `gorm:"column:bluetooth;type:char(30);not null;default:''" json:"bluetooth"` // 蓝牙
|
||||
Cmos string `gorm:"column:cmos;type:char(30);not null;default:''" json:"cmos"` // 芯片
|
||||
Status int32 `gorm:"column:status;type:tinyint(1);default:1" json:"status"` // 装态。1为正常,2为删除
|
||||
Type int32 `gorm:"column:type;type:tinyint(1);default:1" json:"type"` // 类型,1为园屏,2为卵型屏
|
||||
}
|
||||
Reference in New Issue
Block a user