// Code generated by sql2gorm. DO NOT EDIT. package repo import ( "time" "github.com/samber/do" "gorm.io/gorm" ) func init(){ do.Provide[UserOrganizationRepo](nil,NewUserOrganizationRepo) } // 组织角色表 type OrganizationRole struct { ID uint `gorm:"column:id;primary_key;AUTO_INCREMENT"` // id OrgID uint `gorm:"column:org_id;NOT NULL"` // 组织id RoleID uint `gorm:"column:role_id;NOT NULL"` // 角色id CreatedBy string `gorm:"column:created_by"` // 创建人 CreatedOn time.Time `gorm:"column:created_on;default:CURRENT_TIMESTAMP;NOT NULL"` // 记录创建时间 ModifiedBy string `gorm:"column:modified_by"` // 修改人 ModifiedOn time.Time `gorm:"column:modified_on;default:CURRENT_TIMESTAMP"` // 记录修改时间 } func (m *OrganizationRole) TableName() string { return "organization_role" } type OrganizationRoleRepo interface{ } type organizationRoleRepo struct { db *gorm.DB } func NewOrganizationRoleRepo(i *do.Injector)(OrganizationRoleRepo,error){ return &organizationRoleRepo{ db:do.MustInvoke[*gorm.DB](i), },nil }