13 lines
510 B
Go
13 lines
510 B
Go
|
|
package model
|
||
|
|
|
||
|
|
import "time"
|
||
|
|
|
||
|
|
type UserRuleCompletion struct {
|
||
|
|
ID uint `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
|
||
|
|
UserID string `gorm:"column:user_id;size:100;not null;uniqueIndex:idx_user_rule" json:"userId"`
|
||
|
|
RuleID uint `gorm:"column:rule_id;not null;uniqueIndex:idx_user_rule" json:"ruleId"`
|
||
|
|
CompletedAt time.Time `gorm:"column:completed_at;autoCreateTime" json:"completedAt"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (UserRuleCompletion) TableName() string { return "user_rule_completions" }
|