feat: 添加通知微服务,支持站内通知已读状态
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"juwan-backend/app/notification/rpc/internal/models/notifications"
|
||||
"juwan-backend/app/notification/rpc/internal/models/schema"
|
||||
"time"
|
||||
)
|
||||
|
||||
// The init function reads all schema descriptors with runtime code
|
||||
// (default values, validators, hooks and policies) and stitches it
|
||||
// to their package variables.
|
||||
func init() {
|
||||
notificationsFields := schema.Notifications{}.Fields()
|
||||
_ = notificationsFields
|
||||
// notificationsDescType is the schema descriptor for type field.
|
||||
notificationsDescType := notificationsFields[2].Descriptor()
|
||||
// notifications.TypeValidator is a validator for the "type" field. It is called by the builders before save.
|
||||
notifications.TypeValidator = notificationsDescType.Validators[0].(func(string) error)
|
||||
// notificationsDescTitle is the schema descriptor for title field.
|
||||
notificationsDescTitle := notificationsFields[3].Descriptor()
|
||||
// notifications.TitleValidator is a validator for the "title" field. It is called by the builders before save.
|
||||
notifications.TitleValidator = notificationsDescTitle.Validators[0].(func(string) error)
|
||||
// notificationsDescRead is the schema descriptor for read field.
|
||||
notificationsDescRead := notificationsFields[5].Descriptor()
|
||||
// notifications.DefaultRead holds the default value on creation for the read field.
|
||||
notifications.DefaultRead = notificationsDescRead.Default.(bool)
|
||||
// notificationsDescLink is the schema descriptor for link field.
|
||||
notificationsDescLink := notificationsFields[6].Descriptor()
|
||||
// notifications.LinkValidator is a validator for the "link" field. It is called by the builders before save.
|
||||
notifications.LinkValidator = notificationsDescLink.Validators[0].(func(string) error)
|
||||
// notificationsDescCreatedAt is the schema descriptor for created_at field.
|
||||
notificationsDescCreatedAt := notificationsFields[7].Descriptor()
|
||||
// notifications.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
notifications.DefaultCreatedAt = notificationsDescCreatedAt.Default.(func() time.Time)
|
||||
// notificationsDescUpdatedAt is the schema descriptor for updated_at field.
|
||||
notificationsDescUpdatedAt := notificationsFields[8].Descriptor()
|
||||
// notifications.DefaultUpdatedAt holds the default value on creation for the updated_at field.
|
||||
notifications.DefaultUpdatedAt = notificationsDescUpdatedAt.Default.(func() time.Time)
|
||||
// notifications.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
|
||||
notifications.UpdateDefaultUpdatedAt = notificationsDescUpdatedAt.UpdateDefault.(func() time.Time)
|
||||
}
|
||||
Reference in New Issue
Block a user