| 1234567891011121314151617181920212223242526272829303132 |
- package entity
- import (
- "git.sxidc.com/go-framework/baize/framwork/domain"
- )
- type Entity interface {
- domain.Object
- DomainCNName() string
- DomainCamelName() string
- GenerateID() error
- GetID() string
- CheckFieldID(domainCNName string) error
- ForCreate() error
- ForUpdate() error
- }
- func (e *Base) CheckFieldID(domainCNName string) error {
- return CheckID(domainCNName, "ID", e.ID)
- }
- func (e *Base) IDColumnName() string {
- return ColumnID
- }
- func (e *Base) ForCreate() error {
- panic("领域实体没有实现ForCreate接口")
- }
- func (e *Base) ForUpdate() error {
- panic("领域实体没有实现ForUpdate接口")
- }
|