1234567891011121314151617181920212223242526272829303132333435363738394041 |
- package family
- import (
- "git.sxidc.com/go-framework/baize/framework/core/domain"
- "git.sxidc.com/go-framework/baize/framework/core/domain/entity"
- )
- const (
- FieldFather = "Father"
- FieldMother = "Mother"
- )
- var (
- ColumnFather = domain.ColumnName(FieldFather)
- ColumnMother = domain.ColumnName(FieldMother)
- )
- var fieldMap = map[string]string{
- FieldFather: "父亲姓名",
- FieldMother: "母亲姓名",
- }
- type Entity struct {
- entity.Base
- Father string `sqlmapping:"column:father" sqlresult:"column:father" check:"required,lte=128,when=create/update"`
- Mother string `sqlmapping:"column:mother" sqlresult:"column:mother" check:"required,lte=128,when=create/update"`
- StudentID string `sqlmapping:"column:student_id" sqlresult:"column:student_id" check:"required,eq=32"`
- entity.TimeFields
- }
- func (e *Entity) DomainCNName() string {
- return "家庭"
- }
- func (e *Entity) DomainCamelName() string {
- return "Family"
- }
- func (e *Entity) GetFieldMap() map[string]string {
- return fieldMap
- }
|