12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- package configuration
- import (
- "git.sxidc.com/go-framework/baize/framework/core/domain"
- "git.sxidc.com/go-framework/baize/framework/core/domain/value_object"
- )
- const (
- FieldScope = "Scope"
- FieldGroup = "Group"
- FieldValue = "Value"
- )
- var (
- ColumnScope = domain.ColumnName(FieldScope)
- ColumnGroup = domain.ColumnName(FieldGroup)
- ColumnValue = domain.ColumnName(FieldValue)
- )
- var fieldMap = map[string]string{
- FieldScope: "范围",
- FieldGroup: "组",
- FieldValue: "值",
- }
- type ValueObject struct {
- value_object.Base
- Scope string `sqlmapping:"column:scope;key;notUpdate;" sqlresult:"column:scope;" check:"required,lte=256,when=create/delete"`
- Group string `sqlmapping:"column:group;key;notUpdate;" sqlresult:"column:group;" check:"required,lte=256,when=create/delete"`
- Value string `sqlmapping:"column:value;notUpdate;" sqlresult:"column:value;" check:"required,lte=256,when=create"`
- }
- func (valueObject *ValueObject) DomainCNName() string {
- return "配置"
- }
- func (valueObject *ValueObject) DomainCamelName() string {
- return "Configuration"
- }
- func (valueObject *ValueObject) GetFieldMap() map[string]string {
- return fieldMap
- }
|