fix comment system
This commit is contained in:
162
ent/ma_create.go
162
ent/ma_create.go
@@ -153,6 +153,48 @@ func (mc *MaCreate) SetNillableURI(s *string) *MaCreate {
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetCidRoot sets the "cid_root" field.
|
||||
func (mc *MaCreate) SetCidRoot(s string) *MaCreate {
|
||||
mc.mutation.SetCidRoot(s)
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetNillableCidRoot sets the "cid_root" field if the given value is not nil.
|
||||
func (mc *MaCreate) SetNillableCidRoot(s *string) *MaCreate {
|
||||
if s != nil {
|
||||
mc.SetCidRoot(*s)
|
||||
}
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetURIRoot sets the "uri_root" field.
|
||||
func (mc *MaCreate) SetURIRoot(s string) *MaCreate {
|
||||
mc.mutation.SetURIRoot(s)
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetNillableURIRoot sets the "uri_root" field if the given value is not nil.
|
||||
func (mc *MaCreate) SetNillableURIRoot(s *string) *MaCreate {
|
||||
if s != nil {
|
||||
mc.SetURIRoot(*s)
|
||||
}
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetRoot sets the "root" field.
|
||||
func (mc *MaCreate) SetRoot(s string) *MaCreate {
|
||||
mc.mutation.SetRoot(s)
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetNillableRoot sets the "root" field if the given value is not nil.
|
||||
func (mc *MaCreate) SetNillableRoot(s *string) *MaCreate {
|
||||
if s != nil {
|
||||
mc.SetRoot(*s)
|
||||
}
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetRkey sets the "rkey" field.
|
||||
func (mc *MaCreate) SetRkey(s string) *MaCreate {
|
||||
mc.mutation.SetRkey(s)
|
||||
@@ -181,6 +223,90 @@ func (mc *MaCreate) SetNillableBskyURL(s *string) *MaCreate {
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetComment sets the "comment" field.
|
||||
func (mc *MaCreate) SetComment(s string) *MaCreate {
|
||||
mc.mutation.SetComment(s)
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetNillableComment sets the "comment" field if the given value is not nil.
|
||||
func (mc *MaCreate) SetNillableComment(s *string) *MaCreate {
|
||||
if s != nil {
|
||||
mc.SetComment(*s)
|
||||
}
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetBlog sets the "blog" field.
|
||||
func (mc *MaCreate) SetBlog(s string) *MaCreate {
|
||||
mc.mutation.SetBlog(s)
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetNillableBlog sets the "blog" field if the given value is not nil.
|
||||
func (mc *MaCreate) SetNillableBlog(s *string) *MaCreate {
|
||||
if s != nil {
|
||||
mc.SetBlog(*s)
|
||||
}
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetBlogURL sets the "blog_url" field.
|
||||
func (mc *MaCreate) SetBlogURL(s string) *MaCreate {
|
||||
mc.mutation.SetBlogURL(s)
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetNillableBlogURL sets the "blog_url" field if the given value is not nil.
|
||||
func (mc *MaCreate) SetNillableBlogURL(s *string) *MaCreate {
|
||||
if s != nil {
|
||||
mc.SetBlogURL(*s)
|
||||
}
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetDomain sets the "domain" field.
|
||||
func (mc *MaCreate) SetDomain(s string) *MaCreate {
|
||||
mc.mutation.SetDomain(s)
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetNillableDomain sets the "domain" field if the given value is not nil.
|
||||
func (mc *MaCreate) SetNillableDomain(s *string) *MaCreate {
|
||||
if s != nil {
|
||||
mc.SetDomain(*s)
|
||||
}
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetHost sets the "host" field.
|
||||
func (mc *MaCreate) SetHost(s string) *MaCreate {
|
||||
mc.mutation.SetHost(s)
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetNillableHost sets the "host" field if the given value is not nil.
|
||||
func (mc *MaCreate) SetNillableHost(s *string) *MaCreate {
|
||||
if s != nil {
|
||||
mc.SetHost(*s)
|
||||
}
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetFeed sets the "feed" field.
|
||||
func (mc *MaCreate) SetFeed(s string) *MaCreate {
|
||||
mc.mutation.SetFeed(s)
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetNillableFeed sets the "feed" field if the given value is not nil.
|
||||
func (mc *MaCreate) SetNillableFeed(s *string) *MaCreate {
|
||||
if s != nil {
|
||||
mc.SetFeed(*s)
|
||||
}
|
||||
return mc
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the "updated_at" field.
|
||||
func (mc *MaCreate) SetUpdatedAt(t time.Time) *MaCreate {
|
||||
mc.mutation.SetUpdatedAt(t)
|
||||
@@ -344,6 +470,18 @@ func (mc *MaCreate) createSpec() (*Ma, *sqlgraph.CreateSpec) {
|
||||
_spec.SetField(ma.FieldURI, field.TypeString, value)
|
||||
_node.URI = value
|
||||
}
|
||||
if value, ok := mc.mutation.CidRoot(); ok {
|
||||
_spec.SetField(ma.FieldCidRoot, field.TypeString, value)
|
||||
_node.CidRoot = value
|
||||
}
|
||||
if value, ok := mc.mutation.URIRoot(); ok {
|
||||
_spec.SetField(ma.FieldURIRoot, field.TypeString, value)
|
||||
_node.URIRoot = value
|
||||
}
|
||||
if value, ok := mc.mutation.Root(); ok {
|
||||
_spec.SetField(ma.FieldRoot, field.TypeString, value)
|
||||
_node.Root = value
|
||||
}
|
||||
if value, ok := mc.mutation.Rkey(); ok {
|
||||
_spec.SetField(ma.FieldRkey, field.TypeString, value)
|
||||
_node.Rkey = value
|
||||
@@ -352,6 +490,30 @@ func (mc *MaCreate) createSpec() (*Ma, *sqlgraph.CreateSpec) {
|
||||
_spec.SetField(ma.FieldBskyURL, field.TypeString, value)
|
||||
_node.BskyURL = value
|
||||
}
|
||||
if value, ok := mc.mutation.Comment(); ok {
|
||||
_spec.SetField(ma.FieldComment, field.TypeString, value)
|
||||
_node.Comment = value
|
||||
}
|
||||
if value, ok := mc.mutation.Blog(); ok {
|
||||
_spec.SetField(ma.FieldBlog, field.TypeString, value)
|
||||
_node.Blog = value
|
||||
}
|
||||
if value, ok := mc.mutation.BlogURL(); ok {
|
||||
_spec.SetField(ma.FieldBlogURL, field.TypeString, value)
|
||||
_node.BlogURL = value
|
||||
}
|
||||
if value, ok := mc.mutation.Domain(); ok {
|
||||
_spec.SetField(ma.FieldDomain, field.TypeString, value)
|
||||
_node.Domain = value
|
||||
}
|
||||
if value, ok := mc.mutation.Host(); ok {
|
||||
_spec.SetField(ma.FieldHost, field.TypeString, value)
|
||||
_node.Host = value
|
||||
}
|
||||
if value, ok := mc.mutation.Feed(); ok {
|
||||
_spec.SetField(ma.FieldFeed, field.TypeString, value)
|
||||
_node.Feed = value
|
||||
}
|
||||
if value, ok := mc.mutation.UpdatedAt(); ok {
|
||||
_spec.SetField(ma.FieldUpdatedAt, field.TypeTime, value)
|
||||
_node.UpdatedAt = value
|
||||
|
Reference in New Issue
Block a user