fix comment system
This commit is contained in:
parent
336827433e
commit
b3df3250bb
192
docs/wiki.md
192
docs/wiki.md
@ -1,133 +1,87 @@
|
||||
### build
|
||||
## build
|
||||
|
||||
```sh
|
||||
$ vim ent/entc.go
|
||||
$ vim ent/schema/users.go
|
||||
$ go generate ./...
|
||||
$ go build
|
||||
$ ./card
|
||||
|
||||
$ go generate ./...
|
||||
$ PASS=`cat ./token.json|jq -r .password` TOKEN=`cat ./token.json|jq -r .token` go run -mod=mod main.go
|
||||
$ curl -X POST -H "Content-Type: application/json" -d "{\"username\":\"syui\",\"password\":\"$pass\"}" localhost:8080/users
|
||||
$ curl -X POST -H "Content-Type: application/json" -d "{\"owner\":1,\"password\":\"$pass\"}" localhost:8080/cards
|
||||
$ curl -X POST -H "Content-Type: application/json" -d "{\"owner\":1,\"card\":1,\"cp\":11,\"status\":\"normal\",\"password\":\"$pass\"}" localhost:8080/cards
|
||||
$ curl localhost:8080/users
|
||||
$ curl localhost:8080/cards
|
||||
$ curl localhost:8080/users/1
|
||||
$ curl localhost:8080/users/1/card
|
||||
./build.zsh
|
||||
```
|
||||
|
||||
### use
|
||||
## diff
|
||||
|
||||
```sh
|
||||
$ curl -X POST -H "Content-Type: application/json" -d '{"username":"syui",\"password\":\"$pass\"}' https://api.syui.ai/users
|
||||
> diff tmp/ogent/ogent.go ent/ogent/ogent.go
|
||||
|
||||
# onconflict
|
||||
$ !!
|
||||
|
||||
$ curl -sL https://api.syui.ai/users/1
|
||||
```diff
|
||||
< "os"
|
||||
---
|
||||
< var password = os.Getenv("PASS")
|
||||
< var token = os.Getenv("TOKEN")
|
||||
---
|
||||
< if req.Password == password {
|
||||
< b.SetOwnerID(req.Owner)
|
||||
< } else {
|
||||
< b.SetOwnerID(0)
|
||||
< }
|
||||
< //b.SetOwnerID(req.Owner)
|
||||
---
|
||||
> b.SetOwnerID(req.Owner)
|
||||
< //if v, ok := req.Owner.Get(); ok {
|
||||
< // b.SetOwnerID(v)
|
||||
< //}
|
||||
< if v, ok := req.Token.Get(); ok {
|
||||
< if v == token {
|
||||
< b.SetToken(v)
|
||||
< if v, ok := req.Owner.Get(); ok {
|
||||
< b.SetOwnerID(v)
|
||||
< }
|
||||
< }
|
||||
---
|
||||
< //err := h.client.Card.DeleteOneID(params.ID).Exec(ctx)
|
||||
< err := h.client.Card.DeleteOneID(0).Exec(ctx)
|
||||
---
|
||||
> err := h.client.Ue.DeleteOneID(params.ID).Exec(ctx)
|
||||
< //b.SetUsername(req.Username)
|
||||
< if req.Password == password {
|
||||
< b.SetUsername(req.Username)
|
||||
< } else {
|
||||
< b.SetUsername("")
|
||||
< }
|
||||
```
|
||||
|
||||
```sh
|
||||
# item select
|
||||
$ curl -sL "https://api.syui.ai/users?itemsPerPage=255"
|
||||
$ curl -sL "https://api.syui.ai/cards?itemsPerPage=255"
|
||||
$ curl -sL "https://api.syui.ai/users/1/card?itemsPerPage=255"
|
||||
```
|
||||
|
||||
### ref
|
||||
|
||||
```sh
|
||||
$ vim ./ent/ogent/ogent.go
|
||||
// 新規登録の停止
|
||||
// CreateUsers handles POST /users-slice requests.
|
||||
func (h *OgentHandler) CreateUsers(ctx context.Context, req CreateUsersReq) (CreateUsersRes, error) {
|
||||
b := h.client.Users.Create()
|
||||
//b.SetUser(req.User)
|
||||
b.SetUser("syui")
|
||||
}
|
||||
|
||||
// 削除の無効
|
||||
// DeleteUsers handles DELETE /users-slice/{id} requests.
|
||||
func (h *OgentHandler) DeleteUsers(ctx context.Context, params DeleteUsersParams) (DeleteUsersRes, error) {
|
||||
if params.ID != 1 {
|
||||
err := h.client.Users.DeleteOneID(params.ID).Exec(ctx)
|
||||
}
|
||||
return new(DeleteUsersNoContent), nil
|
||||
}
|
||||
|
||||
// 要素の書き換えの禁止
|
||||
// UpdateUsers handles PATCH /users-slice/{id} requests.
|
||||
func (h *OgentHandler) UpdateUsers(ctx context.Context, req UpdateUsersReq, params UpdateUsersParams) (UpdateUsersRes, error) {
|
||||
b := h.client.Users.UpdateOneID(params.ID)
|
||||
// Add all fields.
|
||||
//if v, ok := req.Hp.Get(); ok {
|
||||
// b.SetHp(v)
|
||||
//}
|
||||
```
|
||||
|
||||
### link
|
||||
|
||||
- https://entgo.io/ja/blog/2022/02/15/generate-rest-crud-with-ent-and-ogen/
|
||||
|
||||
- https://github.com/ariga/ogent/blob/main/example/todo/ent/entc.go
|
||||
|
||||
- https://github.com/ent/ent/blob/master/dialect/sql/schema/postgres_test.go
|
||||
|
||||
- https://github.com/go-kratos/beer-shop/tree/main/app/catalog/service/internal/data/ent
|
||||
|
||||
|
||||
### update
|
||||
|
||||
```sh
|
||||
$ curl --dump-header - 'https://api.syui.ai/users' -H 'Origin: https://card.syui.ai'|less
|
||||
```
|
||||
|
||||
> ent/ogent/oas_response_encoders_gen.go
|
||||
|
||||
```go
|
||||
func encodeCreateGroupResponse(response CreateGroupRes, w http.ResponseWriter, span trace.Span) error {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "https://card.syui.ai")
|
||||
switch response := response.(type) {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "https://card.syui.ai")
|
||||
```
|
||||
|
||||
### northflank
|
||||
|
||||
#### backup sqlite
|
||||
|
||||
- `cron`, `repo(private)`, `pass(token)`
|
||||
|
||||
```sh
|
||||
#!/bin/zsh
|
||||
|
||||
pass=password
|
||||
/usr/bin/northflank exec service --project $project --service $service --cmd "/app/data/api/backup.sh $pass"
|
||||
|
||||
function f(){
|
||||
rm /app/data/api/backup.sh
|
||||
echo '#!/bin/bash
|
||||
pass=$1
|
||||
git config --global user.email syui@syui.ai
|
||||
git config --global user.name syui
|
||||
cp -rf /app/data/new.sqlite /app/data/api/latest.sqlite
|
||||
cp -rf /app/data/new.sqlite /app/data/api/`date '+%w'`.sqlite
|
||||
cd /app/data/api
|
||||
git remote add origin https://$pass@github.com/ai/api
|
||||
git add .
|
||||
git commit -m backup
|
||||
git push origin main
|
||||
git remote rm origin
|
||||
' >> /app/data/api/backup.sh
|
||||
chmod +x /app/data/api/backup.sh
|
||||
}
|
||||
```
|
||||
|
||||
#### setting
|
||||
## northflank
|
||||
|
||||
- ports : http, 8080, dns=api.syui.ai
|
||||
- env : PASS=xxx, TOKEN=xxx
|
||||
- cmd-override : /bin/api
|
||||
- volumes : /app/data
|
||||
|
||||
## api
|
||||
|
||||
### get
|
||||
|
||||
```sh
|
||||
$ curl -sL $api/users/2
|
||||
|
||||
$ curl -sL "$api/users?itemsPerPage=2000"
|
||||
|
||||
$ curl -sL "$api/users/$uid/card?itemsPerPage=2550"
|
||||
```
|
||||
|
||||
### post
|
||||
|
||||
```sh
|
||||
$ curl -X POST -H "Content-Type: application/json" -d "{\"username\":\"$name\",\"password\":\"$pass\",\"did\":\"$did\"}" $api/users
|
||||
|
||||
$ curl -X POST -H "Content-Type: application/json" -d "{\"owner\":$uid,\"card\":$card,\"status\":\"$s\",\"cp\":$cp,\"password\":\"$pass\"}" $api/cards
|
||||
```
|
||||
|
||||
### patch
|
||||
|
||||
```sh
|
||||
$ curl -X PATCH -H "Content-Type: application/json" -d "{\"author\":\"$username\", \"count\":$count,\"token\":\"$token\"}" $api/cards/$cid
|
||||
|
||||
$ curl -X PATCH -H "Content-Type: application/json" -d "{\"model\":true,\"model_limit\": 1,\"token\":\"$token\"}" -s $api/users/$uid
|
||||
```
|
||||
|
||||
### delete
|
||||
|
||||
```sh
|
||||
$ curl -X DELETE -H "Content-Type: application/json" -d "{'owner':\"$uid\"}" $api/cards/$cid
|
||||
```
|
||||
|
101
ent/ma.go
101
ent/ma.go
@ -38,10 +38,28 @@ type Ma struct {
|
||||
Cid string `json:"cid,omitempty"`
|
||||
// URI holds the value of the "uri" field.
|
||||
URI string `json:"uri,omitempty"`
|
||||
// CidRoot holds the value of the "cid_root" field.
|
||||
CidRoot string `json:"cid_root,omitempty"`
|
||||
// URIRoot holds the value of the "uri_root" field.
|
||||
URIRoot string `json:"uri_root,omitempty"`
|
||||
// Root holds the value of the "root" field.
|
||||
Root string `json:"root,omitempty"`
|
||||
// Rkey holds the value of the "rkey" field.
|
||||
Rkey string `json:"rkey,omitempty"`
|
||||
// BskyURL holds the value of the "bsky_url" field.
|
||||
BskyURL string `json:"bsky_url,omitempty"`
|
||||
// Comment holds the value of the "comment" field.
|
||||
Comment string `json:"comment,omitempty"`
|
||||
// Blog holds the value of the "blog" field.
|
||||
Blog string `json:"blog,omitempty"`
|
||||
// BlogURL holds the value of the "blog_url" field.
|
||||
BlogURL string `json:"blog_url,omitempty"`
|
||||
// Domain holds the value of the "domain" field.
|
||||
Domain string `json:"domain,omitempty"`
|
||||
// Host holds the value of the "host" field.
|
||||
Host string `json:"host,omitempty"`
|
||||
// Feed holds the value of the "feed" field.
|
||||
Feed string `json:"feed,omitempty"`
|
||||
// UpdatedAt holds the value of the "updated_at" field.
|
||||
UpdatedAt time.Time `json:"updated_at,omitempty"`
|
||||
// CreatedAt holds the value of the "created_at" field.
|
||||
@ -84,7 +102,7 @@ func (*Ma) scanValues(columns []string) ([]any, error) {
|
||||
values[i] = new(sql.NullBool)
|
||||
case ma.FieldID, ma.FieldCount:
|
||||
values[i] = new(sql.NullInt64)
|
||||
case ma.FieldPassword, ma.FieldToken, ma.FieldHandle, ma.FieldText, ma.FieldDid, ma.FieldAvatar, ma.FieldCid, ma.FieldURI, ma.FieldRkey, ma.FieldBskyURL:
|
||||
case ma.FieldPassword, ma.FieldToken, ma.FieldHandle, ma.FieldText, ma.FieldDid, ma.FieldAvatar, ma.FieldCid, ma.FieldURI, ma.FieldCidRoot, ma.FieldURIRoot, ma.FieldRoot, ma.FieldRkey, ma.FieldBskyURL, ma.FieldComment, ma.FieldBlog, ma.FieldBlogURL, ma.FieldDomain, ma.FieldHost, ma.FieldFeed:
|
||||
values[i] = new(sql.NullString)
|
||||
case ma.FieldUpdatedAt, ma.FieldCreatedAt:
|
||||
values[i] = new(sql.NullTime)
|
||||
@ -171,6 +189,24 @@ func (m *Ma) assignValues(columns []string, values []any) error {
|
||||
} else if value.Valid {
|
||||
m.URI = value.String
|
||||
}
|
||||
case ma.FieldCidRoot:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field cid_root", values[i])
|
||||
} else if value.Valid {
|
||||
m.CidRoot = value.String
|
||||
}
|
||||
case ma.FieldURIRoot:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field uri_root", values[i])
|
||||
} else if value.Valid {
|
||||
m.URIRoot = value.String
|
||||
}
|
||||
case ma.FieldRoot:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field root", values[i])
|
||||
} else if value.Valid {
|
||||
m.Root = value.String
|
||||
}
|
||||
case ma.FieldRkey:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field rkey", values[i])
|
||||
@ -183,6 +219,42 @@ func (m *Ma) assignValues(columns []string, values []any) error {
|
||||
} else if value.Valid {
|
||||
m.BskyURL = value.String
|
||||
}
|
||||
case ma.FieldComment:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field comment", values[i])
|
||||
} else if value.Valid {
|
||||
m.Comment = value.String
|
||||
}
|
||||
case ma.FieldBlog:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field blog", values[i])
|
||||
} else if value.Valid {
|
||||
m.Blog = value.String
|
||||
}
|
||||
case ma.FieldBlogURL:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field blog_url", values[i])
|
||||
} else if value.Valid {
|
||||
m.BlogURL = value.String
|
||||
}
|
||||
case ma.FieldDomain:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field domain", values[i])
|
||||
} else if value.Valid {
|
||||
m.Domain = value.String
|
||||
}
|
||||
case ma.FieldHost:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field host", values[i])
|
||||
} else if value.Valid {
|
||||
m.Host = value.String
|
||||
}
|
||||
case ma.FieldFeed:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field feed", values[i])
|
||||
} else if value.Valid {
|
||||
m.Feed = value.String
|
||||
}
|
||||
case ma.FieldUpdatedAt:
|
||||
if value, ok := values[i].(*sql.NullTime); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field updated_at", values[i])
|
||||
@ -271,12 +343,39 @@ func (m *Ma) String() string {
|
||||
builder.WriteString("uri=")
|
||||
builder.WriteString(m.URI)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("cid_root=")
|
||||
builder.WriteString(m.CidRoot)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("uri_root=")
|
||||
builder.WriteString(m.URIRoot)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("root=")
|
||||
builder.WriteString(m.Root)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("rkey=")
|
||||
builder.WriteString(m.Rkey)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("bsky_url=")
|
||||
builder.WriteString(m.BskyURL)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("comment=")
|
||||
builder.WriteString(m.Comment)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("blog=")
|
||||
builder.WriteString(m.Blog)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("blog_url=")
|
||||
builder.WriteString(m.BlogURL)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("domain=")
|
||||
builder.WriteString(m.Domain)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("host=")
|
||||
builder.WriteString(m.Host)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("feed=")
|
||||
builder.WriteString(m.Feed)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("updated_at=")
|
||||
builder.WriteString(m.UpdatedAt.Format(time.ANSIC))
|
||||
builder.WriteString(", ")
|
||||
|
72
ent/ma/ma.go
72
ent/ma/ma.go
@ -34,10 +34,28 @@ const (
|
||||
FieldCid = "cid"
|
||||
// FieldURI holds the string denoting the uri field in the database.
|
||||
FieldURI = "uri"
|
||||
// FieldCidRoot holds the string denoting the cid_root field in the database.
|
||||
FieldCidRoot = "cid_root"
|
||||
// FieldURIRoot holds the string denoting the uri_root field in the database.
|
||||
FieldURIRoot = "uri_root"
|
||||
// FieldRoot holds the string denoting the root field in the database.
|
||||
FieldRoot = "root"
|
||||
// FieldRkey holds the string denoting the rkey field in the database.
|
||||
FieldRkey = "rkey"
|
||||
// FieldBskyURL holds the string denoting the bsky_url field in the database.
|
||||
FieldBskyURL = "bsky_url"
|
||||
// FieldComment holds the string denoting the comment field in the database.
|
||||
FieldComment = "comment"
|
||||
// FieldBlog holds the string denoting the blog field in the database.
|
||||
FieldBlog = "blog"
|
||||
// FieldBlogURL holds the string denoting the blog_url field in the database.
|
||||
FieldBlogURL = "blog_url"
|
||||
// FieldDomain holds the string denoting the domain field in the database.
|
||||
FieldDomain = "domain"
|
||||
// FieldHost holds the string denoting the host field in the database.
|
||||
FieldHost = "host"
|
||||
// FieldFeed holds the string denoting the feed field in the database.
|
||||
FieldFeed = "feed"
|
||||
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
|
||||
FieldUpdatedAt = "updated_at"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
@ -68,8 +86,17 @@ var Columns = []string{
|
||||
FieldAvatar,
|
||||
FieldCid,
|
||||
FieldURI,
|
||||
FieldCidRoot,
|
||||
FieldURIRoot,
|
||||
FieldRoot,
|
||||
FieldRkey,
|
||||
FieldBskyURL,
|
||||
FieldComment,
|
||||
FieldBlog,
|
||||
FieldBlogURL,
|
||||
FieldDomain,
|
||||
FieldHost,
|
||||
FieldFeed,
|
||||
FieldUpdatedAt,
|
||||
FieldCreatedAt,
|
||||
}
|
||||
@ -162,6 +189,21 @@ func ByURI(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldURI, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCidRoot orders the results by the cid_root field.
|
||||
func ByCidRoot(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCidRoot, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByURIRoot orders the results by the uri_root field.
|
||||
func ByURIRoot(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldURIRoot, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRoot orders the results by the root field.
|
||||
func ByRoot(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRoot, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRkey orders the results by the rkey field.
|
||||
func ByRkey(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRkey, opts...).ToFunc()
|
||||
@ -172,6 +214,36 @@ func ByBskyURL(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBskyURL, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByComment orders the results by the comment field.
|
||||
func ByComment(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldComment, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBlog orders the results by the blog field.
|
||||
func ByBlog(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBlog, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBlogURL orders the results by the blog_url field.
|
||||
func ByBlogURL(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBlogURL, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDomain orders the results by the domain field.
|
||||
func ByDomain(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDomain, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByHost orders the results by the host field.
|
||||
func ByHost(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldHost, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFeed orders the results by the feed field.
|
||||
func ByFeed(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFeed, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUpdatedAt orders the results by the updated_at field.
|
||||
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
||||
|
720
ent/ma/where.go
720
ent/ma/where.go
@ -105,6 +105,21 @@ func URI(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldURI, v))
|
||||
}
|
||||
|
||||
// CidRoot applies equality check predicate on the "cid_root" field. It's identical to CidRootEQ.
|
||||
func CidRoot(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldCidRoot, v))
|
||||
}
|
||||
|
||||
// URIRoot applies equality check predicate on the "uri_root" field. It's identical to URIRootEQ.
|
||||
func URIRoot(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldURIRoot, v))
|
||||
}
|
||||
|
||||
// Root applies equality check predicate on the "root" field. It's identical to RootEQ.
|
||||
func Root(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldRoot, v))
|
||||
}
|
||||
|
||||
// Rkey applies equality check predicate on the "rkey" field. It's identical to RkeyEQ.
|
||||
func Rkey(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldRkey, v))
|
||||
@ -115,6 +130,36 @@ func BskyURL(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldBskyURL, v))
|
||||
}
|
||||
|
||||
// Comment applies equality check predicate on the "comment" field. It's identical to CommentEQ.
|
||||
func Comment(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldComment, v))
|
||||
}
|
||||
|
||||
// Blog applies equality check predicate on the "blog" field. It's identical to BlogEQ.
|
||||
func Blog(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldBlog, v))
|
||||
}
|
||||
|
||||
// BlogURL applies equality check predicate on the "blog_url" field. It's identical to BlogURLEQ.
|
||||
func BlogURL(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldBlogURL, v))
|
||||
}
|
||||
|
||||
// Domain applies equality check predicate on the "domain" field. It's identical to DomainEQ.
|
||||
func Domain(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldDomain, v))
|
||||
}
|
||||
|
||||
// Host applies equality check predicate on the "host" field. It's identical to HostEQ.
|
||||
func Host(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldHost, v))
|
||||
}
|
||||
|
||||
// Feed applies equality check predicate on the "feed" field. It's identical to FeedEQ.
|
||||
func Feed(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldFeed, v))
|
||||
}
|
||||
|
||||
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
||||
func UpdatedAt(v time.Time) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
@ -785,6 +830,231 @@ func URIContainsFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContainsFold(FieldURI, v))
|
||||
}
|
||||
|
||||
// CidRootEQ applies the EQ predicate on the "cid_root" field.
|
||||
func CidRootEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldCidRoot, v))
|
||||
}
|
||||
|
||||
// CidRootNEQ applies the NEQ predicate on the "cid_root" field.
|
||||
func CidRootNEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNEQ(FieldCidRoot, v))
|
||||
}
|
||||
|
||||
// CidRootIn applies the In predicate on the "cid_root" field.
|
||||
func CidRootIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIn(FieldCidRoot, vs...))
|
||||
}
|
||||
|
||||
// CidRootNotIn applies the NotIn predicate on the "cid_root" field.
|
||||
func CidRootNotIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotIn(FieldCidRoot, vs...))
|
||||
}
|
||||
|
||||
// CidRootGT applies the GT predicate on the "cid_root" field.
|
||||
func CidRootGT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGT(FieldCidRoot, v))
|
||||
}
|
||||
|
||||
// CidRootGTE applies the GTE predicate on the "cid_root" field.
|
||||
func CidRootGTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGTE(FieldCidRoot, v))
|
||||
}
|
||||
|
||||
// CidRootLT applies the LT predicate on the "cid_root" field.
|
||||
func CidRootLT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLT(FieldCidRoot, v))
|
||||
}
|
||||
|
||||
// CidRootLTE applies the LTE predicate on the "cid_root" field.
|
||||
func CidRootLTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLTE(FieldCidRoot, v))
|
||||
}
|
||||
|
||||
// CidRootContains applies the Contains predicate on the "cid_root" field.
|
||||
func CidRootContains(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContains(FieldCidRoot, v))
|
||||
}
|
||||
|
||||
// CidRootHasPrefix applies the HasPrefix predicate on the "cid_root" field.
|
||||
func CidRootHasPrefix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasPrefix(FieldCidRoot, v))
|
||||
}
|
||||
|
||||
// CidRootHasSuffix applies the HasSuffix predicate on the "cid_root" field.
|
||||
func CidRootHasSuffix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasSuffix(FieldCidRoot, v))
|
||||
}
|
||||
|
||||
// CidRootIsNil applies the IsNil predicate on the "cid_root" field.
|
||||
func CidRootIsNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIsNull(FieldCidRoot))
|
||||
}
|
||||
|
||||
// CidRootNotNil applies the NotNil predicate on the "cid_root" field.
|
||||
func CidRootNotNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotNull(FieldCidRoot))
|
||||
}
|
||||
|
||||
// CidRootEqualFold applies the EqualFold predicate on the "cid_root" field.
|
||||
func CidRootEqualFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEqualFold(FieldCidRoot, v))
|
||||
}
|
||||
|
||||
// CidRootContainsFold applies the ContainsFold predicate on the "cid_root" field.
|
||||
func CidRootContainsFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContainsFold(FieldCidRoot, v))
|
||||
}
|
||||
|
||||
// URIRootEQ applies the EQ predicate on the "uri_root" field.
|
||||
func URIRootEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldURIRoot, v))
|
||||
}
|
||||
|
||||
// URIRootNEQ applies the NEQ predicate on the "uri_root" field.
|
||||
func URIRootNEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNEQ(FieldURIRoot, v))
|
||||
}
|
||||
|
||||
// URIRootIn applies the In predicate on the "uri_root" field.
|
||||
func URIRootIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIn(FieldURIRoot, vs...))
|
||||
}
|
||||
|
||||
// URIRootNotIn applies the NotIn predicate on the "uri_root" field.
|
||||
func URIRootNotIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotIn(FieldURIRoot, vs...))
|
||||
}
|
||||
|
||||
// URIRootGT applies the GT predicate on the "uri_root" field.
|
||||
func URIRootGT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGT(FieldURIRoot, v))
|
||||
}
|
||||
|
||||
// URIRootGTE applies the GTE predicate on the "uri_root" field.
|
||||
func URIRootGTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGTE(FieldURIRoot, v))
|
||||
}
|
||||
|
||||
// URIRootLT applies the LT predicate on the "uri_root" field.
|
||||
func URIRootLT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLT(FieldURIRoot, v))
|
||||
}
|
||||
|
||||
// URIRootLTE applies the LTE predicate on the "uri_root" field.
|
||||
func URIRootLTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLTE(FieldURIRoot, v))
|
||||
}
|
||||
|
||||
// URIRootContains applies the Contains predicate on the "uri_root" field.
|
||||
func URIRootContains(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContains(FieldURIRoot, v))
|
||||
}
|
||||
|
||||
// URIRootHasPrefix applies the HasPrefix predicate on the "uri_root" field.
|
||||
func URIRootHasPrefix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasPrefix(FieldURIRoot, v))
|
||||
}
|
||||
|
||||
// URIRootHasSuffix applies the HasSuffix predicate on the "uri_root" field.
|
||||
func URIRootHasSuffix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasSuffix(FieldURIRoot, v))
|
||||
}
|
||||
|
||||
// URIRootIsNil applies the IsNil predicate on the "uri_root" field.
|
||||
func URIRootIsNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIsNull(FieldURIRoot))
|
||||
}
|
||||
|
||||
// URIRootNotNil applies the NotNil predicate on the "uri_root" field.
|
||||
func URIRootNotNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotNull(FieldURIRoot))
|
||||
}
|
||||
|
||||
// URIRootEqualFold applies the EqualFold predicate on the "uri_root" field.
|
||||
func URIRootEqualFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEqualFold(FieldURIRoot, v))
|
||||
}
|
||||
|
||||
// URIRootContainsFold applies the ContainsFold predicate on the "uri_root" field.
|
||||
func URIRootContainsFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContainsFold(FieldURIRoot, v))
|
||||
}
|
||||
|
||||
// RootEQ applies the EQ predicate on the "root" field.
|
||||
func RootEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldRoot, v))
|
||||
}
|
||||
|
||||
// RootNEQ applies the NEQ predicate on the "root" field.
|
||||
func RootNEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNEQ(FieldRoot, v))
|
||||
}
|
||||
|
||||
// RootIn applies the In predicate on the "root" field.
|
||||
func RootIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIn(FieldRoot, vs...))
|
||||
}
|
||||
|
||||
// RootNotIn applies the NotIn predicate on the "root" field.
|
||||
func RootNotIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotIn(FieldRoot, vs...))
|
||||
}
|
||||
|
||||
// RootGT applies the GT predicate on the "root" field.
|
||||
func RootGT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGT(FieldRoot, v))
|
||||
}
|
||||
|
||||
// RootGTE applies the GTE predicate on the "root" field.
|
||||
func RootGTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGTE(FieldRoot, v))
|
||||
}
|
||||
|
||||
// RootLT applies the LT predicate on the "root" field.
|
||||
func RootLT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLT(FieldRoot, v))
|
||||
}
|
||||
|
||||
// RootLTE applies the LTE predicate on the "root" field.
|
||||
func RootLTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLTE(FieldRoot, v))
|
||||
}
|
||||
|
||||
// RootContains applies the Contains predicate on the "root" field.
|
||||
func RootContains(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContains(FieldRoot, v))
|
||||
}
|
||||
|
||||
// RootHasPrefix applies the HasPrefix predicate on the "root" field.
|
||||
func RootHasPrefix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasPrefix(FieldRoot, v))
|
||||
}
|
||||
|
||||
// RootHasSuffix applies the HasSuffix predicate on the "root" field.
|
||||
func RootHasSuffix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasSuffix(FieldRoot, v))
|
||||
}
|
||||
|
||||
// RootIsNil applies the IsNil predicate on the "root" field.
|
||||
func RootIsNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIsNull(FieldRoot))
|
||||
}
|
||||
|
||||
// RootNotNil applies the NotNil predicate on the "root" field.
|
||||
func RootNotNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotNull(FieldRoot))
|
||||
}
|
||||
|
||||
// RootEqualFold applies the EqualFold predicate on the "root" field.
|
||||
func RootEqualFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEqualFold(FieldRoot, v))
|
||||
}
|
||||
|
||||
// RootContainsFold applies the ContainsFold predicate on the "root" field.
|
||||
func RootContainsFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContainsFold(FieldRoot, v))
|
||||
}
|
||||
|
||||
// RkeyEQ applies the EQ predicate on the "rkey" field.
|
||||
func RkeyEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldRkey, v))
|
||||
@ -935,6 +1205,456 @@ func BskyURLContainsFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContainsFold(FieldBskyURL, v))
|
||||
}
|
||||
|
||||
// CommentEQ applies the EQ predicate on the "comment" field.
|
||||
func CommentEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldComment, v))
|
||||
}
|
||||
|
||||
// CommentNEQ applies the NEQ predicate on the "comment" field.
|
||||
func CommentNEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNEQ(FieldComment, v))
|
||||
}
|
||||
|
||||
// CommentIn applies the In predicate on the "comment" field.
|
||||
func CommentIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIn(FieldComment, vs...))
|
||||
}
|
||||
|
||||
// CommentNotIn applies the NotIn predicate on the "comment" field.
|
||||
func CommentNotIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotIn(FieldComment, vs...))
|
||||
}
|
||||
|
||||
// CommentGT applies the GT predicate on the "comment" field.
|
||||
func CommentGT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGT(FieldComment, v))
|
||||
}
|
||||
|
||||
// CommentGTE applies the GTE predicate on the "comment" field.
|
||||
func CommentGTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGTE(FieldComment, v))
|
||||
}
|
||||
|
||||
// CommentLT applies the LT predicate on the "comment" field.
|
||||
func CommentLT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLT(FieldComment, v))
|
||||
}
|
||||
|
||||
// CommentLTE applies the LTE predicate on the "comment" field.
|
||||
func CommentLTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLTE(FieldComment, v))
|
||||
}
|
||||
|
||||
// CommentContains applies the Contains predicate on the "comment" field.
|
||||
func CommentContains(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContains(FieldComment, v))
|
||||
}
|
||||
|
||||
// CommentHasPrefix applies the HasPrefix predicate on the "comment" field.
|
||||
func CommentHasPrefix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasPrefix(FieldComment, v))
|
||||
}
|
||||
|
||||
// CommentHasSuffix applies the HasSuffix predicate on the "comment" field.
|
||||
func CommentHasSuffix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasSuffix(FieldComment, v))
|
||||
}
|
||||
|
||||
// CommentIsNil applies the IsNil predicate on the "comment" field.
|
||||
func CommentIsNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIsNull(FieldComment))
|
||||
}
|
||||
|
||||
// CommentNotNil applies the NotNil predicate on the "comment" field.
|
||||
func CommentNotNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotNull(FieldComment))
|
||||
}
|
||||
|
||||
// CommentEqualFold applies the EqualFold predicate on the "comment" field.
|
||||
func CommentEqualFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEqualFold(FieldComment, v))
|
||||
}
|
||||
|
||||
// CommentContainsFold applies the ContainsFold predicate on the "comment" field.
|
||||
func CommentContainsFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContainsFold(FieldComment, v))
|
||||
}
|
||||
|
||||
// BlogEQ applies the EQ predicate on the "blog" field.
|
||||
func BlogEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldBlog, v))
|
||||
}
|
||||
|
||||
// BlogNEQ applies the NEQ predicate on the "blog" field.
|
||||
func BlogNEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNEQ(FieldBlog, v))
|
||||
}
|
||||
|
||||
// BlogIn applies the In predicate on the "blog" field.
|
||||
func BlogIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIn(FieldBlog, vs...))
|
||||
}
|
||||
|
||||
// BlogNotIn applies the NotIn predicate on the "blog" field.
|
||||
func BlogNotIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotIn(FieldBlog, vs...))
|
||||
}
|
||||
|
||||
// BlogGT applies the GT predicate on the "blog" field.
|
||||
func BlogGT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGT(FieldBlog, v))
|
||||
}
|
||||
|
||||
// BlogGTE applies the GTE predicate on the "blog" field.
|
||||
func BlogGTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGTE(FieldBlog, v))
|
||||
}
|
||||
|
||||
// BlogLT applies the LT predicate on the "blog" field.
|
||||
func BlogLT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLT(FieldBlog, v))
|
||||
}
|
||||
|
||||
// BlogLTE applies the LTE predicate on the "blog" field.
|
||||
func BlogLTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLTE(FieldBlog, v))
|
||||
}
|
||||
|
||||
// BlogContains applies the Contains predicate on the "blog" field.
|
||||
func BlogContains(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContains(FieldBlog, v))
|
||||
}
|
||||
|
||||
// BlogHasPrefix applies the HasPrefix predicate on the "blog" field.
|
||||
func BlogHasPrefix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasPrefix(FieldBlog, v))
|
||||
}
|
||||
|
||||
// BlogHasSuffix applies the HasSuffix predicate on the "blog" field.
|
||||
func BlogHasSuffix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasSuffix(FieldBlog, v))
|
||||
}
|
||||
|
||||
// BlogIsNil applies the IsNil predicate on the "blog" field.
|
||||
func BlogIsNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIsNull(FieldBlog))
|
||||
}
|
||||
|
||||
// BlogNotNil applies the NotNil predicate on the "blog" field.
|
||||
func BlogNotNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotNull(FieldBlog))
|
||||
}
|
||||
|
||||
// BlogEqualFold applies the EqualFold predicate on the "blog" field.
|
||||
func BlogEqualFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEqualFold(FieldBlog, v))
|
||||
}
|
||||
|
||||
// BlogContainsFold applies the ContainsFold predicate on the "blog" field.
|
||||
func BlogContainsFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContainsFold(FieldBlog, v))
|
||||
}
|
||||
|
||||
// BlogURLEQ applies the EQ predicate on the "blog_url" field.
|
||||
func BlogURLEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldBlogURL, v))
|
||||
}
|
||||
|
||||
// BlogURLNEQ applies the NEQ predicate on the "blog_url" field.
|
||||
func BlogURLNEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNEQ(FieldBlogURL, v))
|
||||
}
|
||||
|
||||
// BlogURLIn applies the In predicate on the "blog_url" field.
|
||||
func BlogURLIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIn(FieldBlogURL, vs...))
|
||||
}
|
||||
|
||||
// BlogURLNotIn applies the NotIn predicate on the "blog_url" field.
|
||||
func BlogURLNotIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotIn(FieldBlogURL, vs...))
|
||||
}
|
||||
|
||||
// BlogURLGT applies the GT predicate on the "blog_url" field.
|
||||
func BlogURLGT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGT(FieldBlogURL, v))
|
||||
}
|
||||
|
||||
// BlogURLGTE applies the GTE predicate on the "blog_url" field.
|
||||
func BlogURLGTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGTE(FieldBlogURL, v))
|
||||
}
|
||||
|
||||
// BlogURLLT applies the LT predicate on the "blog_url" field.
|
||||
func BlogURLLT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLT(FieldBlogURL, v))
|
||||
}
|
||||
|
||||
// BlogURLLTE applies the LTE predicate on the "blog_url" field.
|
||||
func BlogURLLTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLTE(FieldBlogURL, v))
|
||||
}
|
||||
|
||||
// BlogURLContains applies the Contains predicate on the "blog_url" field.
|
||||
func BlogURLContains(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContains(FieldBlogURL, v))
|
||||
}
|
||||
|
||||
// BlogURLHasPrefix applies the HasPrefix predicate on the "blog_url" field.
|
||||
func BlogURLHasPrefix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasPrefix(FieldBlogURL, v))
|
||||
}
|
||||
|
||||
// BlogURLHasSuffix applies the HasSuffix predicate on the "blog_url" field.
|
||||
func BlogURLHasSuffix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasSuffix(FieldBlogURL, v))
|
||||
}
|
||||
|
||||
// BlogURLIsNil applies the IsNil predicate on the "blog_url" field.
|
||||
func BlogURLIsNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIsNull(FieldBlogURL))
|
||||
}
|
||||
|
||||
// BlogURLNotNil applies the NotNil predicate on the "blog_url" field.
|
||||
func BlogURLNotNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotNull(FieldBlogURL))
|
||||
}
|
||||
|
||||
// BlogURLEqualFold applies the EqualFold predicate on the "blog_url" field.
|
||||
func BlogURLEqualFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEqualFold(FieldBlogURL, v))
|
||||
}
|
||||
|
||||
// BlogURLContainsFold applies the ContainsFold predicate on the "blog_url" field.
|
||||
func BlogURLContainsFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContainsFold(FieldBlogURL, v))
|
||||
}
|
||||
|
||||
// DomainEQ applies the EQ predicate on the "domain" field.
|
||||
func DomainEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldDomain, v))
|
||||
}
|
||||
|
||||
// DomainNEQ applies the NEQ predicate on the "domain" field.
|
||||
func DomainNEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNEQ(FieldDomain, v))
|
||||
}
|
||||
|
||||
// DomainIn applies the In predicate on the "domain" field.
|
||||
func DomainIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIn(FieldDomain, vs...))
|
||||
}
|
||||
|
||||
// DomainNotIn applies the NotIn predicate on the "domain" field.
|
||||
func DomainNotIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotIn(FieldDomain, vs...))
|
||||
}
|
||||
|
||||
// DomainGT applies the GT predicate on the "domain" field.
|
||||
func DomainGT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGT(FieldDomain, v))
|
||||
}
|
||||
|
||||
// DomainGTE applies the GTE predicate on the "domain" field.
|
||||
func DomainGTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGTE(FieldDomain, v))
|
||||
}
|
||||
|
||||
// DomainLT applies the LT predicate on the "domain" field.
|
||||
func DomainLT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLT(FieldDomain, v))
|
||||
}
|
||||
|
||||
// DomainLTE applies the LTE predicate on the "domain" field.
|
||||
func DomainLTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLTE(FieldDomain, v))
|
||||
}
|
||||
|
||||
// DomainContains applies the Contains predicate on the "domain" field.
|
||||
func DomainContains(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContains(FieldDomain, v))
|
||||
}
|
||||
|
||||
// DomainHasPrefix applies the HasPrefix predicate on the "domain" field.
|
||||
func DomainHasPrefix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasPrefix(FieldDomain, v))
|
||||
}
|
||||
|
||||
// DomainHasSuffix applies the HasSuffix predicate on the "domain" field.
|
||||
func DomainHasSuffix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasSuffix(FieldDomain, v))
|
||||
}
|
||||
|
||||
// DomainIsNil applies the IsNil predicate on the "domain" field.
|
||||
func DomainIsNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIsNull(FieldDomain))
|
||||
}
|
||||
|
||||
// DomainNotNil applies the NotNil predicate on the "domain" field.
|
||||
func DomainNotNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotNull(FieldDomain))
|
||||
}
|
||||
|
||||
// DomainEqualFold applies the EqualFold predicate on the "domain" field.
|
||||
func DomainEqualFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEqualFold(FieldDomain, v))
|
||||
}
|
||||
|
||||
// DomainContainsFold applies the ContainsFold predicate on the "domain" field.
|
||||
func DomainContainsFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContainsFold(FieldDomain, v))
|
||||
}
|
||||
|
||||
// HostEQ applies the EQ predicate on the "host" field.
|
||||
func HostEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldHost, v))
|
||||
}
|
||||
|
||||
// HostNEQ applies the NEQ predicate on the "host" field.
|
||||
func HostNEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNEQ(FieldHost, v))
|
||||
}
|
||||
|
||||
// HostIn applies the In predicate on the "host" field.
|
||||
func HostIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIn(FieldHost, vs...))
|
||||
}
|
||||
|
||||
// HostNotIn applies the NotIn predicate on the "host" field.
|
||||
func HostNotIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotIn(FieldHost, vs...))
|
||||
}
|
||||
|
||||
// HostGT applies the GT predicate on the "host" field.
|
||||
func HostGT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGT(FieldHost, v))
|
||||
}
|
||||
|
||||
// HostGTE applies the GTE predicate on the "host" field.
|
||||
func HostGTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGTE(FieldHost, v))
|
||||
}
|
||||
|
||||
// HostLT applies the LT predicate on the "host" field.
|
||||
func HostLT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLT(FieldHost, v))
|
||||
}
|
||||
|
||||
// HostLTE applies the LTE predicate on the "host" field.
|
||||
func HostLTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLTE(FieldHost, v))
|
||||
}
|
||||
|
||||
// HostContains applies the Contains predicate on the "host" field.
|
||||
func HostContains(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContains(FieldHost, v))
|
||||
}
|
||||
|
||||
// HostHasPrefix applies the HasPrefix predicate on the "host" field.
|
||||
func HostHasPrefix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasPrefix(FieldHost, v))
|
||||
}
|
||||
|
||||
// HostHasSuffix applies the HasSuffix predicate on the "host" field.
|
||||
func HostHasSuffix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasSuffix(FieldHost, v))
|
||||
}
|
||||
|
||||
// HostIsNil applies the IsNil predicate on the "host" field.
|
||||
func HostIsNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIsNull(FieldHost))
|
||||
}
|
||||
|
||||
// HostNotNil applies the NotNil predicate on the "host" field.
|
||||
func HostNotNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotNull(FieldHost))
|
||||
}
|
||||
|
||||
// HostEqualFold applies the EqualFold predicate on the "host" field.
|
||||
func HostEqualFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEqualFold(FieldHost, v))
|
||||
}
|
||||
|
||||
// HostContainsFold applies the ContainsFold predicate on the "host" field.
|
||||
func HostContainsFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContainsFold(FieldHost, v))
|
||||
}
|
||||
|
||||
// FeedEQ applies the EQ predicate on the "feed" field.
|
||||
func FeedEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldFeed, v))
|
||||
}
|
||||
|
||||
// FeedNEQ applies the NEQ predicate on the "feed" field.
|
||||
func FeedNEQ(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNEQ(FieldFeed, v))
|
||||
}
|
||||
|
||||
// FeedIn applies the In predicate on the "feed" field.
|
||||
func FeedIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIn(FieldFeed, vs...))
|
||||
}
|
||||
|
||||
// FeedNotIn applies the NotIn predicate on the "feed" field.
|
||||
func FeedNotIn(vs ...string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotIn(FieldFeed, vs...))
|
||||
}
|
||||
|
||||
// FeedGT applies the GT predicate on the "feed" field.
|
||||
func FeedGT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGT(FieldFeed, v))
|
||||
}
|
||||
|
||||
// FeedGTE applies the GTE predicate on the "feed" field.
|
||||
func FeedGTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldGTE(FieldFeed, v))
|
||||
}
|
||||
|
||||
// FeedLT applies the LT predicate on the "feed" field.
|
||||
func FeedLT(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLT(FieldFeed, v))
|
||||
}
|
||||
|
||||
// FeedLTE applies the LTE predicate on the "feed" field.
|
||||
func FeedLTE(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldLTE(FieldFeed, v))
|
||||
}
|
||||
|
||||
// FeedContains applies the Contains predicate on the "feed" field.
|
||||
func FeedContains(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContains(FieldFeed, v))
|
||||
}
|
||||
|
||||
// FeedHasPrefix applies the HasPrefix predicate on the "feed" field.
|
||||
func FeedHasPrefix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasPrefix(FieldFeed, v))
|
||||
}
|
||||
|
||||
// FeedHasSuffix applies the HasSuffix predicate on the "feed" field.
|
||||
func FeedHasSuffix(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldHasSuffix(FieldFeed, v))
|
||||
}
|
||||
|
||||
// FeedIsNil applies the IsNil predicate on the "feed" field.
|
||||
func FeedIsNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldIsNull(FieldFeed))
|
||||
}
|
||||
|
||||
// FeedNotNil applies the NotNil predicate on the "feed" field.
|
||||
func FeedNotNil() predicate.Ma {
|
||||
return predicate.Ma(sql.FieldNotNull(FieldFeed))
|
||||
}
|
||||
|
||||
// FeedEqualFold applies the EqualFold predicate on the "feed" field.
|
||||
func FeedEqualFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEqualFold(FieldFeed, v))
|
||||
}
|
||||
|
||||
// FeedContainsFold applies the ContainsFold predicate on the "feed" field.
|
||||
func FeedContainsFold(v string) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldContainsFold(FieldFeed, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||||
func UpdatedAtEQ(v time.Time) predicate.Ma {
|
||||
return predicate.Ma(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
|
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
|
||||
|
468
ent/ma_update.go
468
ent/ma_update.go
@ -216,6 +216,66 @@ func (mu *MaUpdate) ClearURI() *MaUpdate {
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetCidRoot sets the "cid_root" field.
|
||||
func (mu *MaUpdate) SetCidRoot(s string) *MaUpdate {
|
||||
mu.mutation.SetCidRoot(s)
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetNillableCidRoot sets the "cid_root" field if the given value is not nil.
|
||||
func (mu *MaUpdate) SetNillableCidRoot(s *string) *MaUpdate {
|
||||
if s != nil {
|
||||
mu.SetCidRoot(*s)
|
||||
}
|
||||
return mu
|
||||
}
|
||||
|
||||
// ClearCidRoot clears the value of the "cid_root" field.
|
||||
func (mu *MaUpdate) ClearCidRoot() *MaUpdate {
|
||||
mu.mutation.ClearCidRoot()
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetURIRoot sets the "uri_root" field.
|
||||
func (mu *MaUpdate) SetURIRoot(s string) *MaUpdate {
|
||||
mu.mutation.SetURIRoot(s)
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetNillableURIRoot sets the "uri_root" field if the given value is not nil.
|
||||
func (mu *MaUpdate) SetNillableURIRoot(s *string) *MaUpdate {
|
||||
if s != nil {
|
||||
mu.SetURIRoot(*s)
|
||||
}
|
||||
return mu
|
||||
}
|
||||
|
||||
// ClearURIRoot clears the value of the "uri_root" field.
|
||||
func (mu *MaUpdate) ClearURIRoot() *MaUpdate {
|
||||
mu.mutation.ClearURIRoot()
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetRoot sets the "root" field.
|
||||
func (mu *MaUpdate) SetRoot(s string) *MaUpdate {
|
||||
mu.mutation.SetRoot(s)
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetNillableRoot sets the "root" field if the given value is not nil.
|
||||
func (mu *MaUpdate) SetNillableRoot(s *string) *MaUpdate {
|
||||
if s != nil {
|
||||
mu.SetRoot(*s)
|
||||
}
|
||||
return mu
|
||||
}
|
||||
|
||||
// ClearRoot clears the value of the "root" field.
|
||||
func (mu *MaUpdate) ClearRoot() *MaUpdate {
|
||||
mu.mutation.ClearRoot()
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetRkey sets the "rkey" field.
|
||||
func (mu *MaUpdate) SetRkey(s string) *MaUpdate {
|
||||
mu.mutation.SetRkey(s)
|
||||
@ -256,6 +316,126 @@ func (mu *MaUpdate) ClearBskyURL() *MaUpdate {
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetComment sets the "comment" field.
|
||||
func (mu *MaUpdate) SetComment(s string) *MaUpdate {
|
||||
mu.mutation.SetComment(s)
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetNillableComment sets the "comment" field if the given value is not nil.
|
||||
func (mu *MaUpdate) SetNillableComment(s *string) *MaUpdate {
|
||||
if s != nil {
|
||||
mu.SetComment(*s)
|
||||
}
|
||||
return mu
|
||||
}
|
||||
|
||||
// ClearComment clears the value of the "comment" field.
|
||||
func (mu *MaUpdate) ClearComment() *MaUpdate {
|
||||
mu.mutation.ClearComment()
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetBlog sets the "blog" field.
|
||||
func (mu *MaUpdate) SetBlog(s string) *MaUpdate {
|
||||
mu.mutation.SetBlog(s)
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetNillableBlog sets the "blog" field if the given value is not nil.
|
||||
func (mu *MaUpdate) SetNillableBlog(s *string) *MaUpdate {
|
||||
if s != nil {
|
||||
mu.SetBlog(*s)
|
||||
}
|
||||
return mu
|
||||
}
|
||||
|
||||
// ClearBlog clears the value of the "blog" field.
|
||||
func (mu *MaUpdate) ClearBlog() *MaUpdate {
|
||||
mu.mutation.ClearBlog()
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetBlogURL sets the "blog_url" field.
|
||||
func (mu *MaUpdate) SetBlogURL(s string) *MaUpdate {
|
||||
mu.mutation.SetBlogURL(s)
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetNillableBlogURL sets the "blog_url" field if the given value is not nil.
|
||||
func (mu *MaUpdate) SetNillableBlogURL(s *string) *MaUpdate {
|
||||
if s != nil {
|
||||
mu.SetBlogURL(*s)
|
||||
}
|
||||
return mu
|
||||
}
|
||||
|
||||
// ClearBlogURL clears the value of the "blog_url" field.
|
||||
func (mu *MaUpdate) ClearBlogURL() *MaUpdate {
|
||||
mu.mutation.ClearBlogURL()
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetDomain sets the "domain" field.
|
||||
func (mu *MaUpdate) SetDomain(s string) *MaUpdate {
|
||||
mu.mutation.SetDomain(s)
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetNillableDomain sets the "domain" field if the given value is not nil.
|
||||
func (mu *MaUpdate) SetNillableDomain(s *string) *MaUpdate {
|
||||
if s != nil {
|
||||
mu.SetDomain(*s)
|
||||
}
|
||||
return mu
|
||||
}
|
||||
|
||||
// ClearDomain clears the value of the "domain" field.
|
||||
func (mu *MaUpdate) ClearDomain() *MaUpdate {
|
||||
mu.mutation.ClearDomain()
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetHost sets the "host" field.
|
||||
func (mu *MaUpdate) SetHost(s string) *MaUpdate {
|
||||
mu.mutation.SetHost(s)
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetNillableHost sets the "host" field if the given value is not nil.
|
||||
func (mu *MaUpdate) SetNillableHost(s *string) *MaUpdate {
|
||||
if s != nil {
|
||||
mu.SetHost(*s)
|
||||
}
|
||||
return mu
|
||||
}
|
||||
|
||||
// ClearHost clears the value of the "host" field.
|
||||
func (mu *MaUpdate) ClearHost() *MaUpdate {
|
||||
mu.mutation.ClearHost()
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetFeed sets the "feed" field.
|
||||
func (mu *MaUpdate) SetFeed(s string) *MaUpdate {
|
||||
mu.mutation.SetFeed(s)
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetNillableFeed sets the "feed" field if the given value is not nil.
|
||||
func (mu *MaUpdate) SetNillableFeed(s *string) *MaUpdate {
|
||||
if s != nil {
|
||||
mu.SetFeed(*s)
|
||||
}
|
||||
return mu
|
||||
}
|
||||
|
||||
// ClearFeed clears the value of the "feed" field.
|
||||
func (mu *MaUpdate) ClearFeed() *MaUpdate {
|
||||
mu.mutation.ClearFeed()
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the "updated_at" field.
|
||||
func (mu *MaUpdate) SetUpdatedAt(t time.Time) *MaUpdate {
|
||||
mu.mutation.SetUpdatedAt(t)
|
||||
@ -402,6 +582,24 @@ func (mu *MaUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
if mu.mutation.URICleared() {
|
||||
_spec.ClearField(ma.FieldURI, field.TypeString)
|
||||
}
|
||||
if value, ok := mu.mutation.CidRoot(); ok {
|
||||
_spec.SetField(ma.FieldCidRoot, field.TypeString, value)
|
||||
}
|
||||
if mu.mutation.CidRootCleared() {
|
||||
_spec.ClearField(ma.FieldCidRoot, field.TypeString)
|
||||
}
|
||||
if value, ok := mu.mutation.URIRoot(); ok {
|
||||
_spec.SetField(ma.FieldURIRoot, field.TypeString, value)
|
||||
}
|
||||
if mu.mutation.URIRootCleared() {
|
||||
_spec.ClearField(ma.FieldURIRoot, field.TypeString)
|
||||
}
|
||||
if value, ok := mu.mutation.Root(); ok {
|
||||
_spec.SetField(ma.FieldRoot, field.TypeString, value)
|
||||
}
|
||||
if mu.mutation.RootCleared() {
|
||||
_spec.ClearField(ma.FieldRoot, field.TypeString)
|
||||
}
|
||||
if value, ok := mu.mutation.Rkey(); ok {
|
||||
_spec.SetField(ma.FieldRkey, field.TypeString, value)
|
||||
}
|
||||
@ -414,6 +612,42 @@ func (mu *MaUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
if mu.mutation.BskyURLCleared() {
|
||||
_spec.ClearField(ma.FieldBskyURL, field.TypeString)
|
||||
}
|
||||
if value, ok := mu.mutation.Comment(); ok {
|
||||
_spec.SetField(ma.FieldComment, field.TypeString, value)
|
||||
}
|
||||
if mu.mutation.CommentCleared() {
|
||||
_spec.ClearField(ma.FieldComment, field.TypeString)
|
||||
}
|
||||
if value, ok := mu.mutation.Blog(); ok {
|
||||
_spec.SetField(ma.FieldBlog, field.TypeString, value)
|
||||
}
|
||||
if mu.mutation.BlogCleared() {
|
||||
_spec.ClearField(ma.FieldBlog, field.TypeString)
|
||||
}
|
||||
if value, ok := mu.mutation.BlogURL(); ok {
|
||||
_spec.SetField(ma.FieldBlogURL, field.TypeString, value)
|
||||
}
|
||||
if mu.mutation.BlogURLCleared() {
|
||||
_spec.ClearField(ma.FieldBlogURL, field.TypeString)
|
||||
}
|
||||
if value, ok := mu.mutation.Domain(); ok {
|
||||
_spec.SetField(ma.FieldDomain, field.TypeString, value)
|
||||
}
|
||||
if mu.mutation.DomainCleared() {
|
||||
_spec.ClearField(ma.FieldDomain, field.TypeString)
|
||||
}
|
||||
if value, ok := mu.mutation.Host(); ok {
|
||||
_spec.SetField(ma.FieldHost, field.TypeString, value)
|
||||
}
|
||||
if mu.mutation.HostCleared() {
|
||||
_spec.ClearField(ma.FieldHost, field.TypeString)
|
||||
}
|
||||
if value, ok := mu.mutation.Feed(); ok {
|
||||
_spec.SetField(ma.FieldFeed, field.TypeString, value)
|
||||
}
|
||||
if mu.mutation.FeedCleared() {
|
||||
_spec.ClearField(ma.FieldFeed, field.TypeString)
|
||||
}
|
||||
if value, ok := mu.mutation.UpdatedAt(); ok {
|
||||
_spec.SetField(ma.FieldUpdatedAt, field.TypeTime, value)
|
||||
}
|
||||
@ -659,6 +893,66 @@ func (muo *MaUpdateOne) ClearURI() *MaUpdateOne {
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetCidRoot sets the "cid_root" field.
|
||||
func (muo *MaUpdateOne) SetCidRoot(s string) *MaUpdateOne {
|
||||
muo.mutation.SetCidRoot(s)
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetNillableCidRoot sets the "cid_root" field if the given value is not nil.
|
||||
func (muo *MaUpdateOne) SetNillableCidRoot(s *string) *MaUpdateOne {
|
||||
if s != nil {
|
||||
muo.SetCidRoot(*s)
|
||||
}
|
||||
return muo
|
||||
}
|
||||
|
||||
// ClearCidRoot clears the value of the "cid_root" field.
|
||||
func (muo *MaUpdateOne) ClearCidRoot() *MaUpdateOne {
|
||||
muo.mutation.ClearCidRoot()
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetURIRoot sets the "uri_root" field.
|
||||
func (muo *MaUpdateOne) SetURIRoot(s string) *MaUpdateOne {
|
||||
muo.mutation.SetURIRoot(s)
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetNillableURIRoot sets the "uri_root" field if the given value is not nil.
|
||||
func (muo *MaUpdateOne) SetNillableURIRoot(s *string) *MaUpdateOne {
|
||||
if s != nil {
|
||||
muo.SetURIRoot(*s)
|
||||
}
|
||||
return muo
|
||||
}
|
||||
|
||||
// ClearURIRoot clears the value of the "uri_root" field.
|
||||
func (muo *MaUpdateOne) ClearURIRoot() *MaUpdateOne {
|
||||
muo.mutation.ClearURIRoot()
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetRoot sets the "root" field.
|
||||
func (muo *MaUpdateOne) SetRoot(s string) *MaUpdateOne {
|
||||
muo.mutation.SetRoot(s)
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetNillableRoot sets the "root" field if the given value is not nil.
|
||||
func (muo *MaUpdateOne) SetNillableRoot(s *string) *MaUpdateOne {
|
||||
if s != nil {
|
||||
muo.SetRoot(*s)
|
||||
}
|
||||
return muo
|
||||
}
|
||||
|
||||
// ClearRoot clears the value of the "root" field.
|
||||
func (muo *MaUpdateOne) ClearRoot() *MaUpdateOne {
|
||||
muo.mutation.ClearRoot()
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetRkey sets the "rkey" field.
|
||||
func (muo *MaUpdateOne) SetRkey(s string) *MaUpdateOne {
|
||||
muo.mutation.SetRkey(s)
|
||||
@ -699,6 +993,126 @@ func (muo *MaUpdateOne) ClearBskyURL() *MaUpdateOne {
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetComment sets the "comment" field.
|
||||
func (muo *MaUpdateOne) SetComment(s string) *MaUpdateOne {
|
||||
muo.mutation.SetComment(s)
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetNillableComment sets the "comment" field if the given value is not nil.
|
||||
func (muo *MaUpdateOne) SetNillableComment(s *string) *MaUpdateOne {
|
||||
if s != nil {
|
||||
muo.SetComment(*s)
|
||||
}
|
||||
return muo
|
||||
}
|
||||
|
||||
// ClearComment clears the value of the "comment" field.
|
||||
func (muo *MaUpdateOne) ClearComment() *MaUpdateOne {
|
||||
muo.mutation.ClearComment()
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetBlog sets the "blog" field.
|
||||
func (muo *MaUpdateOne) SetBlog(s string) *MaUpdateOne {
|
||||
muo.mutation.SetBlog(s)
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetNillableBlog sets the "blog" field if the given value is not nil.
|
||||
func (muo *MaUpdateOne) SetNillableBlog(s *string) *MaUpdateOne {
|
||||
if s != nil {
|
||||
muo.SetBlog(*s)
|
||||
}
|
||||
return muo
|
||||
}
|
||||
|
||||
// ClearBlog clears the value of the "blog" field.
|
||||
func (muo *MaUpdateOne) ClearBlog() *MaUpdateOne {
|
||||
muo.mutation.ClearBlog()
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetBlogURL sets the "blog_url" field.
|
||||
func (muo *MaUpdateOne) SetBlogURL(s string) *MaUpdateOne {
|
||||
muo.mutation.SetBlogURL(s)
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetNillableBlogURL sets the "blog_url" field if the given value is not nil.
|
||||
func (muo *MaUpdateOne) SetNillableBlogURL(s *string) *MaUpdateOne {
|
||||
if s != nil {
|
||||
muo.SetBlogURL(*s)
|
||||
}
|
||||
return muo
|
||||
}
|
||||
|
||||
// ClearBlogURL clears the value of the "blog_url" field.
|
||||
func (muo *MaUpdateOne) ClearBlogURL() *MaUpdateOne {
|
||||
muo.mutation.ClearBlogURL()
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetDomain sets the "domain" field.
|
||||
func (muo *MaUpdateOne) SetDomain(s string) *MaUpdateOne {
|
||||
muo.mutation.SetDomain(s)
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetNillableDomain sets the "domain" field if the given value is not nil.
|
||||
func (muo *MaUpdateOne) SetNillableDomain(s *string) *MaUpdateOne {
|
||||
if s != nil {
|
||||
muo.SetDomain(*s)
|
||||
}
|
||||
return muo
|
||||
}
|
||||
|
||||
// ClearDomain clears the value of the "domain" field.
|
||||
func (muo *MaUpdateOne) ClearDomain() *MaUpdateOne {
|
||||
muo.mutation.ClearDomain()
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetHost sets the "host" field.
|
||||
func (muo *MaUpdateOne) SetHost(s string) *MaUpdateOne {
|
||||
muo.mutation.SetHost(s)
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetNillableHost sets the "host" field if the given value is not nil.
|
||||
func (muo *MaUpdateOne) SetNillableHost(s *string) *MaUpdateOne {
|
||||
if s != nil {
|
||||
muo.SetHost(*s)
|
||||
}
|
||||
return muo
|
||||
}
|
||||
|
||||
// ClearHost clears the value of the "host" field.
|
||||
func (muo *MaUpdateOne) ClearHost() *MaUpdateOne {
|
||||
muo.mutation.ClearHost()
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetFeed sets the "feed" field.
|
||||
func (muo *MaUpdateOne) SetFeed(s string) *MaUpdateOne {
|
||||
muo.mutation.SetFeed(s)
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetNillableFeed sets the "feed" field if the given value is not nil.
|
||||
func (muo *MaUpdateOne) SetNillableFeed(s *string) *MaUpdateOne {
|
||||
if s != nil {
|
||||
muo.SetFeed(*s)
|
||||
}
|
||||
return muo
|
||||
}
|
||||
|
||||
// ClearFeed clears the value of the "feed" field.
|
||||
func (muo *MaUpdateOne) ClearFeed() *MaUpdateOne {
|
||||
muo.mutation.ClearFeed()
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the "updated_at" field.
|
||||
func (muo *MaUpdateOne) SetUpdatedAt(t time.Time) *MaUpdateOne {
|
||||
muo.mutation.SetUpdatedAt(t)
|
||||
@ -875,6 +1289,24 @@ func (muo *MaUpdateOne) sqlSave(ctx context.Context) (_node *Ma, err error) {
|
||||
if muo.mutation.URICleared() {
|
||||
_spec.ClearField(ma.FieldURI, field.TypeString)
|
||||
}
|
||||
if value, ok := muo.mutation.CidRoot(); ok {
|
||||
_spec.SetField(ma.FieldCidRoot, field.TypeString, value)
|
||||
}
|
||||
if muo.mutation.CidRootCleared() {
|
||||
_spec.ClearField(ma.FieldCidRoot, field.TypeString)
|
||||
}
|
||||
if value, ok := muo.mutation.URIRoot(); ok {
|
||||
_spec.SetField(ma.FieldURIRoot, field.TypeString, value)
|
||||
}
|
||||
if muo.mutation.URIRootCleared() {
|
||||
_spec.ClearField(ma.FieldURIRoot, field.TypeString)
|
||||
}
|
||||
if value, ok := muo.mutation.Root(); ok {
|
||||
_spec.SetField(ma.FieldRoot, field.TypeString, value)
|
||||
}
|
||||
if muo.mutation.RootCleared() {
|
||||
_spec.ClearField(ma.FieldRoot, field.TypeString)
|
||||
}
|
||||
if value, ok := muo.mutation.Rkey(); ok {
|
||||
_spec.SetField(ma.FieldRkey, field.TypeString, value)
|
||||
}
|
||||
@ -887,6 +1319,42 @@ func (muo *MaUpdateOne) sqlSave(ctx context.Context) (_node *Ma, err error) {
|
||||
if muo.mutation.BskyURLCleared() {
|
||||
_spec.ClearField(ma.FieldBskyURL, field.TypeString)
|
||||
}
|
||||
if value, ok := muo.mutation.Comment(); ok {
|
||||
_spec.SetField(ma.FieldComment, field.TypeString, value)
|
||||
}
|
||||
if muo.mutation.CommentCleared() {
|
||||
_spec.ClearField(ma.FieldComment, field.TypeString)
|
||||
}
|
||||
if value, ok := muo.mutation.Blog(); ok {
|
||||
_spec.SetField(ma.FieldBlog, field.TypeString, value)
|
||||
}
|
||||
if muo.mutation.BlogCleared() {
|
||||
_spec.ClearField(ma.FieldBlog, field.TypeString)
|
||||
}
|
||||
if value, ok := muo.mutation.BlogURL(); ok {
|
||||
_spec.SetField(ma.FieldBlogURL, field.TypeString, value)
|
||||
}
|
||||
if muo.mutation.BlogURLCleared() {
|
||||
_spec.ClearField(ma.FieldBlogURL, field.TypeString)
|
||||
}
|
||||
if value, ok := muo.mutation.Domain(); ok {
|
||||
_spec.SetField(ma.FieldDomain, field.TypeString, value)
|
||||
}
|
||||
if muo.mutation.DomainCleared() {
|
||||
_spec.ClearField(ma.FieldDomain, field.TypeString)
|
||||
}
|
||||
if value, ok := muo.mutation.Host(); ok {
|
||||
_spec.SetField(ma.FieldHost, field.TypeString, value)
|
||||
}
|
||||
if muo.mutation.HostCleared() {
|
||||
_spec.ClearField(ma.FieldHost, field.TypeString)
|
||||
}
|
||||
if value, ok := muo.mutation.Feed(); ok {
|
||||
_spec.SetField(ma.FieldFeed, field.TypeString, value)
|
||||
}
|
||||
if muo.mutation.FeedCleared() {
|
||||
_spec.ClearField(ma.FieldFeed, field.TypeString)
|
||||
}
|
||||
if value, ok := muo.mutation.UpdatedAt(); ok {
|
||||
_spec.SetField(ma.FieldUpdatedAt, field.TypeTime, value)
|
||||
}
|
||||
|
@ -69,8 +69,17 @@ var (
|
||||
{Name: "avatar", Type: field.TypeString, Nullable: true},
|
||||
{Name: "cid", Type: field.TypeString, Nullable: true},
|
||||
{Name: "uri", Type: field.TypeString, Nullable: true},
|
||||
{Name: "cid_root", Type: field.TypeString, Nullable: true},
|
||||
{Name: "uri_root", Type: field.TypeString, Nullable: true},
|
||||
{Name: "root", Type: field.TypeString, Nullable: true},
|
||||
{Name: "rkey", Type: field.TypeString, Nullable: true},
|
||||
{Name: "bsky_url", Type: field.TypeString, Nullable: true},
|
||||
{Name: "comment", Type: field.TypeString, Nullable: true},
|
||||
{Name: "blog", Type: field.TypeString, Nullable: true},
|
||||
{Name: "blog_url", Type: field.TypeString, Nullable: true},
|
||||
{Name: "domain", Type: field.TypeString, Nullable: true},
|
||||
{Name: "host", Type: field.TypeString, Nullable: true},
|
||||
{Name: "feed", Type: field.TypeString, Nullable: true},
|
||||
{Name: "updated_at", Type: field.TypeTime, Nullable: true},
|
||||
{Name: "created_at", Type: field.TypeTime, Nullable: true},
|
||||
{Name: "user_ma", Type: field.TypeInt},
|
||||
@ -83,7 +92,7 @@ var (
|
||||
ForeignKeys: []*schema.ForeignKey{
|
||||
{
|
||||
Symbol: "mas_users_ma",
|
||||
Columns: []*schema.Column{MasColumns[15]},
|
||||
Columns: []*schema.Column{MasColumns[24]},
|
||||
RefColumns: []*schema.Column{UsersColumns[0]},
|
||||
OnDelete: schema.NoAction,
|
||||
},
|
||||
@ -193,7 +202,7 @@ var (
|
||||
{Name: "ten_post", Type: field.TypeString, Nullable: true},
|
||||
{Name: "ten_get", Type: field.TypeString, Nullable: true},
|
||||
{Name: "ten_at", Type: field.TypeTime, Nullable: true},
|
||||
{Name: "next", Type: field.TypeString, Nullable: true, Default: "20240410"},
|
||||
{Name: "next", Type: field.TypeString, Nullable: true, Default: "20240424"},
|
||||
{Name: "room", Type: field.TypeInt, Nullable: true},
|
||||
{Name: "model", Type: field.TypeBool, Nullable: true},
|
||||
{Name: "model_at", Type: field.TypeTime, Nullable: true},
|
||||
|
659
ent/mutation.go
659
ent/mutation.go
@ -1685,8 +1685,17 @@ type MaMutation struct {
|
||||
avatar *string
|
||||
cid *string
|
||||
uri *string
|
||||
cid_root *string
|
||||
uri_root *string
|
||||
root *string
|
||||
rkey *string
|
||||
bsky_url *string
|
||||
comment *string
|
||||
blog *string
|
||||
blog_url *string
|
||||
domain *string
|
||||
host *string
|
||||
feed *string
|
||||
updated_at *time.Time
|
||||
created_at *time.Time
|
||||
clearedFields map[string]struct{}
|
||||
@ -2293,6 +2302,153 @@ func (m *MaMutation) ResetURI() {
|
||||
delete(m.clearedFields, ma.FieldURI)
|
||||
}
|
||||
|
||||
// SetCidRoot sets the "cid_root" field.
|
||||
func (m *MaMutation) SetCidRoot(s string) {
|
||||
m.cid_root = &s
|
||||
}
|
||||
|
||||
// CidRoot returns the value of the "cid_root" field in the mutation.
|
||||
func (m *MaMutation) CidRoot() (r string, exists bool) {
|
||||
v := m.cid_root
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldCidRoot returns the old "cid_root" field's value of the Ma entity.
|
||||
// If the Ma object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *MaMutation) OldCidRoot(ctx context.Context) (v string, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldCidRoot is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldCidRoot requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldCidRoot: %w", err)
|
||||
}
|
||||
return oldValue.CidRoot, nil
|
||||
}
|
||||
|
||||
// ClearCidRoot clears the value of the "cid_root" field.
|
||||
func (m *MaMutation) ClearCidRoot() {
|
||||
m.cid_root = nil
|
||||
m.clearedFields[ma.FieldCidRoot] = struct{}{}
|
||||
}
|
||||
|
||||
// CidRootCleared returns if the "cid_root" field was cleared in this mutation.
|
||||
func (m *MaMutation) CidRootCleared() bool {
|
||||
_, ok := m.clearedFields[ma.FieldCidRoot]
|
||||
return ok
|
||||
}
|
||||
|
||||
// ResetCidRoot resets all changes to the "cid_root" field.
|
||||
func (m *MaMutation) ResetCidRoot() {
|
||||
m.cid_root = nil
|
||||
delete(m.clearedFields, ma.FieldCidRoot)
|
||||
}
|
||||
|
||||
// SetURIRoot sets the "uri_root" field.
|
||||
func (m *MaMutation) SetURIRoot(s string) {
|
||||
m.uri_root = &s
|
||||
}
|
||||
|
||||
// URIRoot returns the value of the "uri_root" field in the mutation.
|
||||
func (m *MaMutation) URIRoot() (r string, exists bool) {
|
||||
v := m.uri_root
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldURIRoot returns the old "uri_root" field's value of the Ma entity.
|
||||
// If the Ma object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *MaMutation) OldURIRoot(ctx context.Context) (v string, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldURIRoot is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldURIRoot requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldURIRoot: %w", err)
|
||||
}
|
||||
return oldValue.URIRoot, nil
|
||||
}
|
||||
|
||||
// ClearURIRoot clears the value of the "uri_root" field.
|
||||
func (m *MaMutation) ClearURIRoot() {
|
||||
m.uri_root = nil
|
||||
m.clearedFields[ma.FieldURIRoot] = struct{}{}
|
||||
}
|
||||
|
||||
// URIRootCleared returns if the "uri_root" field was cleared in this mutation.
|
||||
func (m *MaMutation) URIRootCleared() bool {
|
||||
_, ok := m.clearedFields[ma.FieldURIRoot]
|
||||
return ok
|
||||
}
|
||||
|
||||
// ResetURIRoot resets all changes to the "uri_root" field.
|
||||
func (m *MaMutation) ResetURIRoot() {
|
||||
m.uri_root = nil
|
||||
delete(m.clearedFields, ma.FieldURIRoot)
|
||||
}
|
||||
|
||||
// SetRoot sets the "root" field.
|
||||
func (m *MaMutation) SetRoot(s string) {
|
||||
m.root = &s
|
||||
}
|
||||
|
||||
// Root returns the value of the "root" field in the mutation.
|
||||
func (m *MaMutation) Root() (r string, exists bool) {
|
||||
v := m.root
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldRoot returns the old "root" field's value of the Ma entity.
|
||||
// If the Ma object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *MaMutation) OldRoot(ctx context.Context) (v string, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldRoot is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldRoot requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldRoot: %w", err)
|
||||
}
|
||||
return oldValue.Root, nil
|
||||
}
|
||||
|
||||
// ClearRoot clears the value of the "root" field.
|
||||
func (m *MaMutation) ClearRoot() {
|
||||
m.root = nil
|
||||
m.clearedFields[ma.FieldRoot] = struct{}{}
|
||||
}
|
||||
|
||||
// RootCleared returns if the "root" field was cleared in this mutation.
|
||||
func (m *MaMutation) RootCleared() bool {
|
||||
_, ok := m.clearedFields[ma.FieldRoot]
|
||||
return ok
|
||||
}
|
||||
|
||||
// ResetRoot resets all changes to the "root" field.
|
||||
func (m *MaMutation) ResetRoot() {
|
||||
m.root = nil
|
||||
delete(m.clearedFields, ma.FieldRoot)
|
||||
}
|
||||
|
||||
// SetRkey sets the "rkey" field.
|
||||
func (m *MaMutation) SetRkey(s string) {
|
||||
m.rkey = &s
|
||||
@ -2391,6 +2547,300 @@ func (m *MaMutation) ResetBskyURL() {
|
||||
delete(m.clearedFields, ma.FieldBskyURL)
|
||||
}
|
||||
|
||||
// SetComment sets the "comment" field.
|
||||
func (m *MaMutation) SetComment(s string) {
|
||||
m.comment = &s
|
||||
}
|
||||
|
||||
// Comment returns the value of the "comment" field in the mutation.
|
||||
func (m *MaMutation) Comment() (r string, exists bool) {
|
||||
v := m.comment
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldComment returns the old "comment" field's value of the Ma entity.
|
||||
// If the Ma object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *MaMutation) OldComment(ctx context.Context) (v string, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldComment is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldComment requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldComment: %w", err)
|
||||
}
|
||||
return oldValue.Comment, nil
|
||||
}
|
||||
|
||||
// ClearComment clears the value of the "comment" field.
|
||||
func (m *MaMutation) ClearComment() {
|
||||
m.comment = nil
|
||||
m.clearedFields[ma.FieldComment] = struct{}{}
|
||||
}
|
||||
|
||||
// CommentCleared returns if the "comment" field was cleared in this mutation.
|
||||
func (m *MaMutation) CommentCleared() bool {
|
||||
_, ok := m.clearedFields[ma.FieldComment]
|
||||
return ok
|
||||
}
|
||||
|
||||
// ResetComment resets all changes to the "comment" field.
|
||||
func (m *MaMutation) ResetComment() {
|
||||
m.comment = nil
|
||||
delete(m.clearedFields, ma.FieldComment)
|
||||
}
|
||||
|
||||
// SetBlog sets the "blog" field.
|
||||
func (m *MaMutation) SetBlog(s string) {
|
||||
m.blog = &s
|
||||
}
|
||||
|
||||
// Blog returns the value of the "blog" field in the mutation.
|
||||
func (m *MaMutation) Blog() (r string, exists bool) {
|
||||
v := m.blog
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldBlog returns the old "blog" field's value of the Ma entity.
|
||||
// If the Ma object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *MaMutation) OldBlog(ctx context.Context) (v string, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldBlog is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldBlog requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldBlog: %w", err)
|
||||
}
|
||||
return oldValue.Blog, nil
|
||||
}
|
||||
|
||||
// ClearBlog clears the value of the "blog" field.
|
||||
func (m *MaMutation) ClearBlog() {
|
||||
m.blog = nil
|
||||
m.clearedFields[ma.FieldBlog] = struct{}{}
|
||||
}
|
||||
|
||||
// BlogCleared returns if the "blog" field was cleared in this mutation.
|
||||
func (m *MaMutation) BlogCleared() bool {
|
||||
_, ok := m.clearedFields[ma.FieldBlog]
|
||||
return ok
|
||||
}
|
||||
|
||||
// ResetBlog resets all changes to the "blog" field.
|
||||
func (m *MaMutation) ResetBlog() {
|
||||
m.blog = nil
|
||||
delete(m.clearedFields, ma.FieldBlog)
|
||||
}
|
||||
|
||||
// SetBlogURL sets the "blog_url" field.
|
||||
func (m *MaMutation) SetBlogURL(s string) {
|
||||
m.blog_url = &s
|
||||
}
|
||||
|
||||
// BlogURL returns the value of the "blog_url" field in the mutation.
|
||||
func (m *MaMutation) BlogURL() (r string, exists bool) {
|
||||
v := m.blog_url
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldBlogURL returns the old "blog_url" field's value of the Ma entity.
|
||||
// If the Ma object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *MaMutation) OldBlogURL(ctx context.Context) (v string, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldBlogURL is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldBlogURL requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldBlogURL: %w", err)
|
||||
}
|
||||
return oldValue.BlogURL, nil
|
||||
}
|
||||
|
||||
// ClearBlogURL clears the value of the "blog_url" field.
|
||||
func (m *MaMutation) ClearBlogURL() {
|
||||
m.blog_url = nil
|
||||
m.clearedFields[ma.FieldBlogURL] = struct{}{}
|
||||
}
|
||||
|
||||
// BlogURLCleared returns if the "blog_url" field was cleared in this mutation.
|
||||
func (m *MaMutation) BlogURLCleared() bool {
|
||||
_, ok := m.clearedFields[ma.FieldBlogURL]
|
||||
return ok
|
||||
}
|
||||
|
||||
// ResetBlogURL resets all changes to the "blog_url" field.
|
||||
func (m *MaMutation) ResetBlogURL() {
|
||||
m.blog_url = nil
|
||||
delete(m.clearedFields, ma.FieldBlogURL)
|
||||
}
|
||||
|
||||
// SetDomain sets the "domain" field.
|
||||
func (m *MaMutation) SetDomain(s string) {
|
||||
m.domain = &s
|
||||
}
|
||||
|
||||
// Domain returns the value of the "domain" field in the mutation.
|
||||
func (m *MaMutation) Domain() (r string, exists bool) {
|
||||
v := m.domain
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldDomain returns the old "domain" field's value of the Ma entity.
|
||||
// If the Ma object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *MaMutation) OldDomain(ctx context.Context) (v string, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldDomain is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldDomain requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldDomain: %w", err)
|
||||
}
|
||||
return oldValue.Domain, nil
|
||||
}
|
||||
|
||||
// ClearDomain clears the value of the "domain" field.
|
||||
func (m *MaMutation) ClearDomain() {
|
||||
m.domain = nil
|
||||
m.clearedFields[ma.FieldDomain] = struct{}{}
|
||||
}
|
||||
|
||||
// DomainCleared returns if the "domain" field was cleared in this mutation.
|
||||
func (m *MaMutation) DomainCleared() bool {
|
||||
_, ok := m.clearedFields[ma.FieldDomain]
|
||||
return ok
|
||||
}
|
||||
|
||||
// ResetDomain resets all changes to the "domain" field.
|
||||
func (m *MaMutation) ResetDomain() {
|
||||
m.domain = nil
|
||||
delete(m.clearedFields, ma.FieldDomain)
|
||||
}
|
||||
|
||||
// SetHost sets the "host" field.
|
||||
func (m *MaMutation) SetHost(s string) {
|
||||
m.host = &s
|
||||
}
|
||||
|
||||
// Host returns the value of the "host" field in the mutation.
|
||||
func (m *MaMutation) Host() (r string, exists bool) {
|
||||
v := m.host
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldHost returns the old "host" field's value of the Ma entity.
|
||||
// If the Ma object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *MaMutation) OldHost(ctx context.Context) (v string, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldHost is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldHost requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldHost: %w", err)
|
||||
}
|
||||
return oldValue.Host, nil
|
||||
}
|
||||
|
||||
// ClearHost clears the value of the "host" field.
|
||||
func (m *MaMutation) ClearHost() {
|
||||
m.host = nil
|
||||
m.clearedFields[ma.FieldHost] = struct{}{}
|
||||
}
|
||||
|
||||
// HostCleared returns if the "host" field was cleared in this mutation.
|
||||
func (m *MaMutation) HostCleared() bool {
|
||||
_, ok := m.clearedFields[ma.FieldHost]
|
||||
return ok
|
||||
}
|
||||
|
||||
// ResetHost resets all changes to the "host" field.
|
||||
func (m *MaMutation) ResetHost() {
|
||||
m.host = nil
|
||||
delete(m.clearedFields, ma.FieldHost)
|
||||
}
|
||||
|
||||
// SetFeed sets the "feed" field.
|
||||
func (m *MaMutation) SetFeed(s string) {
|
||||
m.feed = &s
|
||||
}
|
||||
|
||||
// Feed returns the value of the "feed" field in the mutation.
|
||||
func (m *MaMutation) Feed() (r string, exists bool) {
|
||||
v := m.feed
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldFeed returns the old "feed" field's value of the Ma entity.
|
||||
// If the Ma object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *MaMutation) OldFeed(ctx context.Context) (v string, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldFeed is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldFeed requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldFeed: %w", err)
|
||||
}
|
||||
return oldValue.Feed, nil
|
||||
}
|
||||
|
||||
// ClearFeed clears the value of the "feed" field.
|
||||
func (m *MaMutation) ClearFeed() {
|
||||
m.feed = nil
|
||||
m.clearedFields[ma.FieldFeed] = struct{}{}
|
||||
}
|
||||
|
||||
// FeedCleared returns if the "feed" field was cleared in this mutation.
|
||||
func (m *MaMutation) FeedCleared() bool {
|
||||
_, ok := m.clearedFields[ma.FieldFeed]
|
||||
return ok
|
||||
}
|
||||
|
||||
// ResetFeed resets all changes to the "feed" field.
|
||||
func (m *MaMutation) ResetFeed() {
|
||||
m.feed = nil
|
||||
delete(m.clearedFields, ma.FieldFeed)
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the "updated_at" field.
|
||||
func (m *MaMutation) SetUpdatedAt(t time.Time) {
|
||||
m.updated_at = &t
|
||||
@ -2562,7 +3012,7 @@ func (m *MaMutation) Type() string {
|
||||
// order to get all numeric fields that were incremented/decremented, call
|
||||
// AddedFields().
|
||||
func (m *MaMutation) Fields() []string {
|
||||
fields := make([]string, 0, 14)
|
||||
fields := make([]string, 0, 23)
|
||||
if m.password != nil {
|
||||
fields = append(fields, ma.FieldPassword)
|
||||
}
|
||||
@ -2593,12 +3043,39 @@ func (m *MaMutation) Fields() []string {
|
||||
if m.uri != nil {
|
||||
fields = append(fields, ma.FieldURI)
|
||||
}
|
||||
if m.cid_root != nil {
|
||||
fields = append(fields, ma.FieldCidRoot)
|
||||
}
|
||||
if m.uri_root != nil {
|
||||
fields = append(fields, ma.FieldURIRoot)
|
||||
}
|
||||
if m.root != nil {
|
||||
fields = append(fields, ma.FieldRoot)
|
||||
}
|
||||
if m.rkey != nil {
|
||||
fields = append(fields, ma.FieldRkey)
|
||||
}
|
||||
if m.bsky_url != nil {
|
||||
fields = append(fields, ma.FieldBskyURL)
|
||||
}
|
||||
if m.comment != nil {
|
||||
fields = append(fields, ma.FieldComment)
|
||||
}
|
||||
if m.blog != nil {
|
||||
fields = append(fields, ma.FieldBlog)
|
||||
}
|
||||
if m.blog_url != nil {
|
||||
fields = append(fields, ma.FieldBlogURL)
|
||||
}
|
||||
if m.domain != nil {
|
||||
fields = append(fields, ma.FieldDomain)
|
||||
}
|
||||
if m.host != nil {
|
||||
fields = append(fields, ma.FieldHost)
|
||||
}
|
||||
if m.feed != nil {
|
||||
fields = append(fields, ma.FieldFeed)
|
||||
}
|
||||
if m.updated_at != nil {
|
||||
fields = append(fields, ma.FieldUpdatedAt)
|
||||
}
|
||||
@ -2633,10 +3110,28 @@ func (m *MaMutation) Field(name string) (ent.Value, bool) {
|
||||
return m.Cid()
|
||||
case ma.FieldURI:
|
||||
return m.URI()
|
||||
case ma.FieldCidRoot:
|
||||
return m.CidRoot()
|
||||
case ma.FieldURIRoot:
|
||||
return m.URIRoot()
|
||||
case ma.FieldRoot:
|
||||
return m.Root()
|
||||
case ma.FieldRkey:
|
||||
return m.Rkey()
|
||||
case ma.FieldBskyURL:
|
||||
return m.BskyURL()
|
||||
case ma.FieldComment:
|
||||
return m.Comment()
|
||||
case ma.FieldBlog:
|
||||
return m.Blog()
|
||||
case ma.FieldBlogURL:
|
||||
return m.BlogURL()
|
||||
case ma.FieldDomain:
|
||||
return m.Domain()
|
||||
case ma.FieldHost:
|
||||
return m.Host()
|
||||
case ma.FieldFeed:
|
||||
return m.Feed()
|
||||
case ma.FieldUpdatedAt:
|
||||
return m.UpdatedAt()
|
||||
case ma.FieldCreatedAt:
|
||||
@ -2670,10 +3165,28 @@ func (m *MaMutation) OldField(ctx context.Context, name string) (ent.Value, erro
|
||||
return m.OldCid(ctx)
|
||||
case ma.FieldURI:
|
||||
return m.OldURI(ctx)
|
||||
case ma.FieldCidRoot:
|
||||
return m.OldCidRoot(ctx)
|
||||
case ma.FieldURIRoot:
|
||||
return m.OldURIRoot(ctx)
|
||||
case ma.FieldRoot:
|
||||
return m.OldRoot(ctx)
|
||||
case ma.FieldRkey:
|
||||
return m.OldRkey(ctx)
|
||||
case ma.FieldBskyURL:
|
||||
return m.OldBskyURL(ctx)
|
||||
case ma.FieldComment:
|
||||
return m.OldComment(ctx)
|
||||
case ma.FieldBlog:
|
||||
return m.OldBlog(ctx)
|
||||
case ma.FieldBlogURL:
|
||||
return m.OldBlogURL(ctx)
|
||||
case ma.FieldDomain:
|
||||
return m.OldDomain(ctx)
|
||||
case ma.FieldHost:
|
||||
return m.OldHost(ctx)
|
||||
case ma.FieldFeed:
|
||||
return m.OldFeed(ctx)
|
||||
case ma.FieldUpdatedAt:
|
||||
return m.OldUpdatedAt(ctx)
|
||||
case ma.FieldCreatedAt:
|
||||
@ -2757,6 +3270,27 @@ func (m *MaMutation) SetField(name string, value ent.Value) error {
|
||||
}
|
||||
m.SetURI(v)
|
||||
return nil
|
||||
case ma.FieldCidRoot:
|
||||
v, ok := value.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetCidRoot(v)
|
||||
return nil
|
||||
case ma.FieldURIRoot:
|
||||
v, ok := value.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetURIRoot(v)
|
||||
return nil
|
||||
case ma.FieldRoot:
|
||||
v, ok := value.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetRoot(v)
|
||||
return nil
|
||||
case ma.FieldRkey:
|
||||
v, ok := value.(string)
|
||||
if !ok {
|
||||
@ -2771,6 +3305,48 @@ func (m *MaMutation) SetField(name string, value ent.Value) error {
|
||||
}
|
||||
m.SetBskyURL(v)
|
||||
return nil
|
||||
case ma.FieldComment:
|
||||
v, ok := value.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetComment(v)
|
||||
return nil
|
||||
case ma.FieldBlog:
|
||||
v, ok := value.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetBlog(v)
|
||||
return nil
|
||||
case ma.FieldBlogURL:
|
||||
v, ok := value.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetBlogURL(v)
|
||||
return nil
|
||||
case ma.FieldDomain:
|
||||
v, ok := value.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetDomain(v)
|
||||
return nil
|
||||
case ma.FieldHost:
|
||||
v, ok := value.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetHost(v)
|
||||
return nil
|
||||
case ma.FieldFeed:
|
||||
v, ok := value.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetFeed(v)
|
||||
return nil
|
||||
case ma.FieldUpdatedAt:
|
||||
v, ok := value.(time.Time)
|
||||
if !ok {
|
||||
@ -2857,12 +3433,39 @@ func (m *MaMutation) ClearedFields() []string {
|
||||
if m.FieldCleared(ma.FieldURI) {
|
||||
fields = append(fields, ma.FieldURI)
|
||||
}
|
||||
if m.FieldCleared(ma.FieldCidRoot) {
|
||||
fields = append(fields, ma.FieldCidRoot)
|
||||
}
|
||||
if m.FieldCleared(ma.FieldURIRoot) {
|
||||
fields = append(fields, ma.FieldURIRoot)
|
||||
}
|
||||
if m.FieldCleared(ma.FieldRoot) {
|
||||
fields = append(fields, ma.FieldRoot)
|
||||
}
|
||||
if m.FieldCleared(ma.FieldRkey) {
|
||||
fields = append(fields, ma.FieldRkey)
|
||||
}
|
||||
if m.FieldCleared(ma.FieldBskyURL) {
|
||||
fields = append(fields, ma.FieldBskyURL)
|
||||
}
|
||||
if m.FieldCleared(ma.FieldComment) {
|
||||
fields = append(fields, ma.FieldComment)
|
||||
}
|
||||
if m.FieldCleared(ma.FieldBlog) {
|
||||
fields = append(fields, ma.FieldBlog)
|
||||
}
|
||||
if m.FieldCleared(ma.FieldBlogURL) {
|
||||
fields = append(fields, ma.FieldBlogURL)
|
||||
}
|
||||
if m.FieldCleared(ma.FieldDomain) {
|
||||
fields = append(fields, ma.FieldDomain)
|
||||
}
|
||||
if m.FieldCleared(ma.FieldHost) {
|
||||
fields = append(fields, ma.FieldHost)
|
||||
}
|
||||
if m.FieldCleared(ma.FieldFeed) {
|
||||
fields = append(fields, ma.FieldFeed)
|
||||
}
|
||||
if m.FieldCleared(ma.FieldUpdatedAt) {
|
||||
fields = append(fields, ma.FieldUpdatedAt)
|
||||
}
|
||||
@ -2910,12 +3513,39 @@ func (m *MaMutation) ClearField(name string) error {
|
||||
case ma.FieldURI:
|
||||
m.ClearURI()
|
||||
return nil
|
||||
case ma.FieldCidRoot:
|
||||
m.ClearCidRoot()
|
||||
return nil
|
||||
case ma.FieldURIRoot:
|
||||
m.ClearURIRoot()
|
||||
return nil
|
||||
case ma.FieldRoot:
|
||||
m.ClearRoot()
|
||||
return nil
|
||||
case ma.FieldRkey:
|
||||
m.ClearRkey()
|
||||
return nil
|
||||
case ma.FieldBskyURL:
|
||||
m.ClearBskyURL()
|
||||
return nil
|
||||
case ma.FieldComment:
|
||||
m.ClearComment()
|
||||
return nil
|
||||
case ma.FieldBlog:
|
||||
m.ClearBlog()
|
||||
return nil
|
||||
case ma.FieldBlogURL:
|
||||
m.ClearBlogURL()
|
||||
return nil
|
||||
case ma.FieldDomain:
|
||||
m.ClearDomain()
|
||||
return nil
|
||||
case ma.FieldHost:
|
||||
m.ClearHost()
|
||||
return nil
|
||||
case ma.FieldFeed:
|
||||
m.ClearFeed()
|
||||
return nil
|
||||
case ma.FieldUpdatedAt:
|
||||
m.ClearUpdatedAt()
|
||||
return nil
|
||||
@ -2960,12 +3590,39 @@ func (m *MaMutation) ResetField(name string) error {
|
||||
case ma.FieldURI:
|
||||
m.ResetURI()
|
||||
return nil
|
||||
case ma.FieldCidRoot:
|
||||
m.ResetCidRoot()
|
||||
return nil
|
||||
case ma.FieldURIRoot:
|
||||
m.ResetURIRoot()
|
||||
return nil
|
||||
case ma.FieldRoot:
|
||||
m.ResetRoot()
|
||||
return nil
|
||||
case ma.FieldRkey:
|
||||
m.ResetRkey()
|
||||
return nil
|
||||
case ma.FieldBskyURL:
|
||||
m.ResetBskyURL()
|
||||
return nil
|
||||
case ma.FieldComment:
|
||||
m.ResetComment()
|
||||
return nil
|
||||
case ma.FieldBlog:
|
||||
m.ResetBlog()
|
||||
return nil
|
||||
case ma.FieldBlogURL:
|
||||
m.ResetBlogURL()
|
||||
return nil
|
||||
case ma.FieldDomain:
|
||||
m.ResetDomain()
|
||||
return nil
|
||||
case ma.FieldHost:
|
||||
m.ResetHost()
|
||||
return nil
|
||||
case ma.FieldFeed:
|
||||
m.ResetFeed()
|
||||
return nil
|
||||
case ma.FieldUpdatedAt:
|
||||
m.ResetUpdatedAt()
|
||||
return nil
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1142,8 +1142,17 @@ type CreateMaReq struct {
|
||||
Avatar OptString `json:"avatar"`
|
||||
Cid OptString `json:"cid"`
|
||||
URI OptString `json:"uri"`
|
||||
CidRoot OptString `json:"cid_root"`
|
||||
URIRoot OptString `json:"uri_root"`
|
||||
Root OptString `json:"root"`
|
||||
Rkey OptString `json:"rkey"`
|
||||
BskyURL OptString `json:"bsky_url"`
|
||||
Comment OptString `json:"comment"`
|
||||
Blog OptString `json:"blog"`
|
||||
BlogURL OptString `json:"blog_url"`
|
||||
Domain OptString `json:"domain"`
|
||||
Host OptString `json:"host"`
|
||||
Feed OptString `json:"feed"`
|
||||
UpdatedAt OptDateTime `json:"updated_at"`
|
||||
CreatedAt OptDateTime `json:"created_at"`
|
||||
Owner int `json:"owner"`
|
||||
@ -1199,6 +1208,21 @@ func (s *CreateMaReq) GetURI() OptString {
|
||||
return s.URI
|
||||
}
|
||||
|
||||
// GetCidRoot returns the value of CidRoot.
|
||||
func (s *CreateMaReq) GetCidRoot() OptString {
|
||||
return s.CidRoot
|
||||
}
|
||||
|
||||
// GetURIRoot returns the value of URIRoot.
|
||||
func (s *CreateMaReq) GetURIRoot() OptString {
|
||||
return s.URIRoot
|
||||
}
|
||||
|
||||
// GetRoot returns the value of Root.
|
||||
func (s *CreateMaReq) GetRoot() OptString {
|
||||
return s.Root
|
||||
}
|
||||
|
||||
// GetRkey returns the value of Rkey.
|
||||
func (s *CreateMaReq) GetRkey() OptString {
|
||||
return s.Rkey
|
||||
@ -1209,6 +1233,36 @@ func (s *CreateMaReq) GetBskyURL() OptString {
|
||||
return s.BskyURL
|
||||
}
|
||||
|
||||
// GetComment returns the value of Comment.
|
||||
func (s *CreateMaReq) GetComment() OptString {
|
||||
return s.Comment
|
||||
}
|
||||
|
||||
// GetBlog returns the value of Blog.
|
||||
func (s *CreateMaReq) GetBlog() OptString {
|
||||
return s.Blog
|
||||
}
|
||||
|
||||
// GetBlogURL returns the value of BlogURL.
|
||||
func (s *CreateMaReq) GetBlogURL() OptString {
|
||||
return s.BlogURL
|
||||
}
|
||||
|
||||
// GetDomain returns the value of Domain.
|
||||
func (s *CreateMaReq) GetDomain() OptString {
|
||||
return s.Domain
|
||||
}
|
||||
|
||||
// GetHost returns the value of Host.
|
||||
func (s *CreateMaReq) GetHost() OptString {
|
||||
return s.Host
|
||||
}
|
||||
|
||||
// GetFeed returns the value of Feed.
|
||||
func (s *CreateMaReq) GetFeed() OptString {
|
||||
return s.Feed
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the value of UpdatedAt.
|
||||
func (s *CreateMaReq) GetUpdatedAt() OptDateTime {
|
||||
return s.UpdatedAt
|
||||
@ -1274,6 +1328,21 @@ func (s *CreateMaReq) SetURI(val OptString) {
|
||||
s.URI = val
|
||||
}
|
||||
|
||||
// SetCidRoot sets the value of CidRoot.
|
||||
func (s *CreateMaReq) SetCidRoot(val OptString) {
|
||||
s.CidRoot = val
|
||||
}
|
||||
|
||||
// SetURIRoot sets the value of URIRoot.
|
||||
func (s *CreateMaReq) SetURIRoot(val OptString) {
|
||||
s.URIRoot = val
|
||||
}
|
||||
|
||||
// SetRoot sets the value of Root.
|
||||
func (s *CreateMaReq) SetRoot(val OptString) {
|
||||
s.Root = val
|
||||
}
|
||||
|
||||
// SetRkey sets the value of Rkey.
|
||||
func (s *CreateMaReq) SetRkey(val OptString) {
|
||||
s.Rkey = val
|
||||
@ -1284,6 +1353,36 @@ func (s *CreateMaReq) SetBskyURL(val OptString) {
|
||||
s.BskyURL = val
|
||||
}
|
||||
|
||||
// SetComment sets the value of Comment.
|
||||
func (s *CreateMaReq) SetComment(val OptString) {
|
||||
s.Comment = val
|
||||
}
|
||||
|
||||
// SetBlog sets the value of Blog.
|
||||
func (s *CreateMaReq) SetBlog(val OptString) {
|
||||
s.Blog = val
|
||||
}
|
||||
|
||||
// SetBlogURL sets the value of BlogURL.
|
||||
func (s *CreateMaReq) SetBlogURL(val OptString) {
|
||||
s.BlogURL = val
|
||||
}
|
||||
|
||||
// SetDomain sets the value of Domain.
|
||||
func (s *CreateMaReq) SetDomain(val OptString) {
|
||||
s.Domain = val
|
||||
}
|
||||
|
||||
// SetHost sets the value of Host.
|
||||
func (s *CreateMaReq) SetHost(val OptString) {
|
||||
s.Host = val
|
||||
}
|
||||
|
||||
// SetFeed sets the value of Feed.
|
||||
func (s *CreateMaReq) SetFeed(val OptString) {
|
||||
s.Feed = val
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the value of UpdatedAt.
|
||||
func (s *CreateMaReq) SetUpdatedAt(val OptDateTime) {
|
||||
s.UpdatedAt = val
|
||||
@ -3009,8 +3108,17 @@ type MaCreate struct {
|
||||
Avatar OptString `json:"avatar"`
|
||||
Cid OptString `json:"cid"`
|
||||
URI OptString `json:"uri"`
|
||||
CidRoot OptString `json:"cid_root"`
|
||||
URIRoot OptString `json:"uri_root"`
|
||||
Root OptString `json:"root"`
|
||||
Rkey OptString `json:"rkey"`
|
||||
BskyURL OptString `json:"bsky_url"`
|
||||
Comment OptString `json:"comment"`
|
||||
Blog OptString `json:"blog"`
|
||||
BlogURL OptString `json:"blog_url"`
|
||||
Domain OptString `json:"domain"`
|
||||
Host OptString `json:"host"`
|
||||
Feed OptString `json:"feed"`
|
||||
UpdatedAt OptDateTime `json:"updated_at"`
|
||||
CreatedAt OptDateTime `json:"created_at"`
|
||||
}
|
||||
@ -3060,6 +3168,21 @@ func (s *MaCreate) GetURI() OptString {
|
||||
return s.URI
|
||||
}
|
||||
|
||||
// GetCidRoot returns the value of CidRoot.
|
||||
func (s *MaCreate) GetCidRoot() OptString {
|
||||
return s.CidRoot
|
||||
}
|
||||
|
||||
// GetURIRoot returns the value of URIRoot.
|
||||
func (s *MaCreate) GetURIRoot() OptString {
|
||||
return s.URIRoot
|
||||
}
|
||||
|
||||
// GetRoot returns the value of Root.
|
||||
func (s *MaCreate) GetRoot() OptString {
|
||||
return s.Root
|
||||
}
|
||||
|
||||
// GetRkey returns the value of Rkey.
|
||||
func (s *MaCreate) GetRkey() OptString {
|
||||
return s.Rkey
|
||||
@ -3070,6 +3193,36 @@ func (s *MaCreate) GetBskyURL() OptString {
|
||||
return s.BskyURL
|
||||
}
|
||||
|
||||
// GetComment returns the value of Comment.
|
||||
func (s *MaCreate) GetComment() OptString {
|
||||
return s.Comment
|
||||
}
|
||||
|
||||
// GetBlog returns the value of Blog.
|
||||
func (s *MaCreate) GetBlog() OptString {
|
||||
return s.Blog
|
||||
}
|
||||
|
||||
// GetBlogURL returns the value of BlogURL.
|
||||
func (s *MaCreate) GetBlogURL() OptString {
|
||||
return s.BlogURL
|
||||
}
|
||||
|
||||
// GetDomain returns the value of Domain.
|
||||
func (s *MaCreate) GetDomain() OptString {
|
||||
return s.Domain
|
||||
}
|
||||
|
||||
// GetHost returns the value of Host.
|
||||
func (s *MaCreate) GetHost() OptString {
|
||||
return s.Host
|
||||
}
|
||||
|
||||
// GetFeed returns the value of Feed.
|
||||
func (s *MaCreate) GetFeed() OptString {
|
||||
return s.Feed
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the value of UpdatedAt.
|
||||
func (s *MaCreate) GetUpdatedAt() OptDateTime {
|
||||
return s.UpdatedAt
|
||||
@ -3125,6 +3278,21 @@ func (s *MaCreate) SetURI(val OptString) {
|
||||
s.URI = val
|
||||
}
|
||||
|
||||
// SetCidRoot sets the value of CidRoot.
|
||||
func (s *MaCreate) SetCidRoot(val OptString) {
|
||||
s.CidRoot = val
|
||||
}
|
||||
|
||||
// SetURIRoot sets the value of URIRoot.
|
||||
func (s *MaCreate) SetURIRoot(val OptString) {
|
||||
s.URIRoot = val
|
||||
}
|
||||
|
||||
// SetRoot sets the value of Root.
|
||||
func (s *MaCreate) SetRoot(val OptString) {
|
||||
s.Root = val
|
||||
}
|
||||
|
||||
// SetRkey sets the value of Rkey.
|
||||
func (s *MaCreate) SetRkey(val OptString) {
|
||||
s.Rkey = val
|
||||
@ -3135,6 +3303,36 @@ func (s *MaCreate) SetBskyURL(val OptString) {
|
||||
s.BskyURL = val
|
||||
}
|
||||
|
||||
// SetComment sets the value of Comment.
|
||||
func (s *MaCreate) SetComment(val OptString) {
|
||||
s.Comment = val
|
||||
}
|
||||
|
||||
// SetBlog sets the value of Blog.
|
||||
func (s *MaCreate) SetBlog(val OptString) {
|
||||
s.Blog = val
|
||||
}
|
||||
|
||||
// SetBlogURL sets the value of BlogURL.
|
||||
func (s *MaCreate) SetBlogURL(val OptString) {
|
||||
s.BlogURL = val
|
||||
}
|
||||
|
||||
// SetDomain sets the value of Domain.
|
||||
func (s *MaCreate) SetDomain(val OptString) {
|
||||
s.Domain = val
|
||||
}
|
||||
|
||||
// SetHost sets the value of Host.
|
||||
func (s *MaCreate) SetHost(val OptString) {
|
||||
s.Host = val
|
||||
}
|
||||
|
||||
// SetFeed sets the value of Feed.
|
||||
func (s *MaCreate) SetFeed(val OptString) {
|
||||
s.Feed = val
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the value of UpdatedAt.
|
||||
func (s *MaCreate) SetUpdatedAt(val OptDateTime) {
|
||||
s.UpdatedAt = val
|
||||
@ -3158,8 +3356,17 @@ type MaList struct {
|
||||
Avatar OptString `json:"avatar"`
|
||||
Cid OptString `json:"cid"`
|
||||
URI OptString `json:"uri"`
|
||||
CidRoot OptString `json:"cid_root"`
|
||||
URIRoot OptString `json:"uri_root"`
|
||||
Root OptString `json:"root"`
|
||||
Rkey OptString `json:"rkey"`
|
||||
BskyURL OptString `json:"bsky_url"`
|
||||
Comment OptString `json:"comment"`
|
||||
Blog OptString `json:"blog"`
|
||||
BlogURL OptString `json:"blog_url"`
|
||||
Domain OptString `json:"domain"`
|
||||
Host OptString `json:"host"`
|
||||
Feed OptString `json:"feed"`
|
||||
UpdatedAt OptDateTime `json:"updated_at"`
|
||||
CreatedAt OptDateTime `json:"created_at"`
|
||||
}
|
||||
@ -3209,6 +3416,21 @@ func (s *MaList) GetURI() OptString {
|
||||
return s.URI
|
||||
}
|
||||
|
||||
// GetCidRoot returns the value of CidRoot.
|
||||
func (s *MaList) GetCidRoot() OptString {
|
||||
return s.CidRoot
|
||||
}
|
||||
|
||||
// GetURIRoot returns the value of URIRoot.
|
||||
func (s *MaList) GetURIRoot() OptString {
|
||||
return s.URIRoot
|
||||
}
|
||||
|
||||
// GetRoot returns the value of Root.
|
||||
func (s *MaList) GetRoot() OptString {
|
||||
return s.Root
|
||||
}
|
||||
|
||||
// GetRkey returns the value of Rkey.
|
||||
func (s *MaList) GetRkey() OptString {
|
||||
return s.Rkey
|
||||
@ -3219,6 +3441,36 @@ func (s *MaList) GetBskyURL() OptString {
|
||||
return s.BskyURL
|
||||
}
|
||||
|
||||
// GetComment returns the value of Comment.
|
||||
func (s *MaList) GetComment() OptString {
|
||||
return s.Comment
|
||||
}
|
||||
|
||||
// GetBlog returns the value of Blog.
|
||||
func (s *MaList) GetBlog() OptString {
|
||||
return s.Blog
|
||||
}
|
||||
|
||||
// GetBlogURL returns the value of BlogURL.
|
||||
func (s *MaList) GetBlogURL() OptString {
|
||||
return s.BlogURL
|
||||
}
|
||||
|
||||
// GetDomain returns the value of Domain.
|
||||
func (s *MaList) GetDomain() OptString {
|
||||
return s.Domain
|
||||
}
|
||||
|
||||
// GetHost returns the value of Host.
|
||||
func (s *MaList) GetHost() OptString {
|
||||
return s.Host
|
||||
}
|
||||
|
||||
// GetFeed returns the value of Feed.
|
||||
func (s *MaList) GetFeed() OptString {
|
||||
return s.Feed
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the value of UpdatedAt.
|
||||
func (s *MaList) GetUpdatedAt() OptDateTime {
|
||||
return s.UpdatedAt
|
||||
@ -3274,6 +3526,21 @@ func (s *MaList) SetURI(val OptString) {
|
||||
s.URI = val
|
||||
}
|
||||
|
||||
// SetCidRoot sets the value of CidRoot.
|
||||
func (s *MaList) SetCidRoot(val OptString) {
|
||||
s.CidRoot = val
|
||||
}
|
||||
|
||||
// SetURIRoot sets the value of URIRoot.
|
||||
func (s *MaList) SetURIRoot(val OptString) {
|
||||
s.URIRoot = val
|
||||
}
|
||||
|
||||
// SetRoot sets the value of Root.
|
||||
func (s *MaList) SetRoot(val OptString) {
|
||||
s.Root = val
|
||||
}
|
||||
|
||||
// SetRkey sets the value of Rkey.
|
||||
func (s *MaList) SetRkey(val OptString) {
|
||||
s.Rkey = val
|
||||
@ -3284,6 +3551,36 @@ func (s *MaList) SetBskyURL(val OptString) {
|
||||
s.BskyURL = val
|
||||
}
|
||||
|
||||
// SetComment sets the value of Comment.
|
||||
func (s *MaList) SetComment(val OptString) {
|
||||
s.Comment = val
|
||||
}
|
||||
|
||||
// SetBlog sets the value of Blog.
|
||||
func (s *MaList) SetBlog(val OptString) {
|
||||
s.Blog = val
|
||||
}
|
||||
|
||||
// SetBlogURL sets the value of BlogURL.
|
||||
func (s *MaList) SetBlogURL(val OptString) {
|
||||
s.BlogURL = val
|
||||
}
|
||||
|
||||
// SetDomain sets the value of Domain.
|
||||
func (s *MaList) SetDomain(val OptString) {
|
||||
s.Domain = val
|
||||
}
|
||||
|
||||
// SetHost sets the value of Host.
|
||||
func (s *MaList) SetHost(val OptString) {
|
||||
s.Host = val
|
||||
}
|
||||
|
||||
// SetFeed sets the value of Feed.
|
||||
func (s *MaList) SetFeed(val OptString) {
|
||||
s.Feed = val
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the value of UpdatedAt.
|
||||
func (s *MaList) SetUpdatedAt(val OptDateTime) {
|
||||
s.UpdatedAt = val
|
||||
@ -3850,8 +4147,17 @@ type MaRead struct {
|
||||
Avatar OptString `json:"avatar"`
|
||||
Cid OptString `json:"cid"`
|
||||
URI OptString `json:"uri"`
|
||||
CidRoot OptString `json:"cid_root"`
|
||||
URIRoot OptString `json:"uri_root"`
|
||||
Root OptString `json:"root"`
|
||||
Rkey OptString `json:"rkey"`
|
||||
BskyURL OptString `json:"bsky_url"`
|
||||
Comment OptString `json:"comment"`
|
||||
Blog OptString `json:"blog"`
|
||||
BlogURL OptString `json:"blog_url"`
|
||||
Domain OptString `json:"domain"`
|
||||
Host OptString `json:"host"`
|
||||
Feed OptString `json:"feed"`
|
||||
UpdatedAt OptDateTime `json:"updated_at"`
|
||||
CreatedAt OptDateTime `json:"created_at"`
|
||||
}
|
||||
@ -3901,6 +4207,21 @@ func (s *MaRead) GetURI() OptString {
|
||||
return s.URI
|
||||
}
|
||||
|
||||
// GetCidRoot returns the value of CidRoot.
|
||||
func (s *MaRead) GetCidRoot() OptString {
|
||||
return s.CidRoot
|
||||
}
|
||||
|
||||
// GetURIRoot returns the value of URIRoot.
|
||||
func (s *MaRead) GetURIRoot() OptString {
|
||||
return s.URIRoot
|
||||
}
|
||||
|
||||
// GetRoot returns the value of Root.
|
||||
func (s *MaRead) GetRoot() OptString {
|
||||
return s.Root
|
||||
}
|
||||
|
||||
// GetRkey returns the value of Rkey.
|
||||
func (s *MaRead) GetRkey() OptString {
|
||||
return s.Rkey
|
||||
@ -3911,6 +4232,36 @@ func (s *MaRead) GetBskyURL() OptString {
|
||||
return s.BskyURL
|
||||
}
|
||||
|
||||
// GetComment returns the value of Comment.
|
||||
func (s *MaRead) GetComment() OptString {
|
||||
return s.Comment
|
||||
}
|
||||
|
||||
// GetBlog returns the value of Blog.
|
||||
func (s *MaRead) GetBlog() OptString {
|
||||
return s.Blog
|
||||
}
|
||||
|
||||
// GetBlogURL returns the value of BlogURL.
|
||||
func (s *MaRead) GetBlogURL() OptString {
|
||||
return s.BlogURL
|
||||
}
|
||||
|
||||
// GetDomain returns the value of Domain.
|
||||
func (s *MaRead) GetDomain() OptString {
|
||||
return s.Domain
|
||||
}
|
||||
|
||||
// GetHost returns the value of Host.
|
||||
func (s *MaRead) GetHost() OptString {
|
||||
return s.Host
|
||||
}
|
||||
|
||||
// GetFeed returns the value of Feed.
|
||||
func (s *MaRead) GetFeed() OptString {
|
||||
return s.Feed
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the value of UpdatedAt.
|
||||
func (s *MaRead) GetUpdatedAt() OptDateTime {
|
||||
return s.UpdatedAt
|
||||
@ -3966,6 +4317,21 @@ func (s *MaRead) SetURI(val OptString) {
|
||||
s.URI = val
|
||||
}
|
||||
|
||||
// SetCidRoot sets the value of CidRoot.
|
||||
func (s *MaRead) SetCidRoot(val OptString) {
|
||||
s.CidRoot = val
|
||||
}
|
||||
|
||||
// SetURIRoot sets the value of URIRoot.
|
||||
func (s *MaRead) SetURIRoot(val OptString) {
|
||||
s.URIRoot = val
|
||||
}
|
||||
|
||||
// SetRoot sets the value of Root.
|
||||
func (s *MaRead) SetRoot(val OptString) {
|
||||
s.Root = val
|
||||
}
|
||||
|
||||
// SetRkey sets the value of Rkey.
|
||||
func (s *MaRead) SetRkey(val OptString) {
|
||||
s.Rkey = val
|
||||
@ -3976,6 +4342,36 @@ func (s *MaRead) SetBskyURL(val OptString) {
|
||||
s.BskyURL = val
|
||||
}
|
||||
|
||||
// SetComment sets the value of Comment.
|
||||
func (s *MaRead) SetComment(val OptString) {
|
||||
s.Comment = val
|
||||
}
|
||||
|
||||
// SetBlog sets the value of Blog.
|
||||
func (s *MaRead) SetBlog(val OptString) {
|
||||
s.Blog = val
|
||||
}
|
||||
|
||||
// SetBlogURL sets the value of BlogURL.
|
||||
func (s *MaRead) SetBlogURL(val OptString) {
|
||||
s.BlogURL = val
|
||||
}
|
||||
|
||||
// SetDomain sets the value of Domain.
|
||||
func (s *MaRead) SetDomain(val OptString) {
|
||||
s.Domain = val
|
||||
}
|
||||
|
||||
// SetHost sets the value of Host.
|
||||
func (s *MaRead) SetHost(val OptString) {
|
||||
s.Host = val
|
||||
}
|
||||
|
||||
// SetFeed sets the value of Feed.
|
||||
func (s *MaRead) SetFeed(val OptString) {
|
||||
s.Feed = val
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the value of UpdatedAt.
|
||||
func (s *MaRead) SetUpdatedAt(val OptDateTime) {
|
||||
s.UpdatedAt = val
|
||||
@ -3999,8 +4395,17 @@ type MaUpdate struct {
|
||||
Avatar OptString `json:"avatar"`
|
||||
Cid OptString `json:"cid"`
|
||||
URI OptString `json:"uri"`
|
||||
CidRoot OptString `json:"cid_root"`
|
||||
URIRoot OptString `json:"uri_root"`
|
||||
Root OptString `json:"root"`
|
||||
Rkey OptString `json:"rkey"`
|
||||
BskyURL OptString `json:"bsky_url"`
|
||||
Comment OptString `json:"comment"`
|
||||
Blog OptString `json:"blog"`
|
||||
BlogURL OptString `json:"blog_url"`
|
||||
Domain OptString `json:"domain"`
|
||||
Host OptString `json:"host"`
|
||||
Feed OptString `json:"feed"`
|
||||
UpdatedAt OptDateTime `json:"updated_at"`
|
||||
CreatedAt OptDateTime `json:"created_at"`
|
||||
}
|
||||
@ -4050,6 +4455,21 @@ func (s *MaUpdate) GetURI() OptString {
|
||||
return s.URI
|
||||
}
|
||||
|
||||
// GetCidRoot returns the value of CidRoot.
|
||||
func (s *MaUpdate) GetCidRoot() OptString {
|
||||
return s.CidRoot
|
||||
}
|
||||
|
||||
// GetURIRoot returns the value of URIRoot.
|
||||
func (s *MaUpdate) GetURIRoot() OptString {
|
||||
return s.URIRoot
|
||||
}
|
||||
|
||||
// GetRoot returns the value of Root.
|
||||
func (s *MaUpdate) GetRoot() OptString {
|
||||
return s.Root
|
||||
}
|
||||
|
||||
// GetRkey returns the value of Rkey.
|
||||
func (s *MaUpdate) GetRkey() OptString {
|
||||
return s.Rkey
|
||||
@ -4060,6 +4480,36 @@ func (s *MaUpdate) GetBskyURL() OptString {
|
||||
return s.BskyURL
|
||||
}
|
||||
|
||||
// GetComment returns the value of Comment.
|
||||
func (s *MaUpdate) GetComment() OptString {
|
||||
return s.Comment
|
||||
}
|
||||
|
||||
// GetBlog returns the value of Blog.
|
||||
func (s *MaUpdate) GetBlog() OptString {
|
||||
return s.Blog
|
||||
}
|
||||
|
||||
// GetBlogURL returns the value of BlogURL.
|
||||
func (s *MaUpdate) GetBlogURL() OptString {
|
||||
return s.BlogURL
|
||||
}
|
||||
|
||||
// GetDomain returns the value of Domain.
|
||||
func (s *MaUpdate) GetDomain() OptString {
|
||||
return s.Domain
|
||||
}
|
||||
|
||||
// GetHost returns the value of Host.
|
||||
func (s *MaUpdate) GetHost() OptString {
|
||||
return s.Host
|
||||
}
|
||||
|
||||
// GetFeed returns the value of Feed.
|
||||
func (s *MaUpdate) GetFeed() OptString {
|
||||
return s.Feed
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the value of UpdatedAt.
|
||||
func (s *MaUpdate) GetUpdatedAt() OptDateTime {
|
||||
return s.UpdatedAt
|
||||
@ -4115,6 +4565,21 @@ func (s *MaUpdate) SetURI(val OptString) {
|
||||
s.URI = val
|
||||
}
|
||||
|
||||
// SetCidRoot sets the value of CidRoot.
|
||||
func (s *MaUpdate) SetCidRoot(val OptString) {
|
||||
s.CidRoot = val
|
||||
}
|
||||
|
||||
// SetURIRoot sets the value of URIRoot.
|
||||
func (s *MaUpdate) SetURIRoot(val OptString) {
|
||||
s.URIRoot = val
|
||||
}
|
||||
|
||||
// SetRoot sets the value of Root.
|
||||
func (s *MaUpdate) SetRoot(val OptString) {
|
||||
s.Root = val
|
||||
}
|
||||
|
||||
// SetRkey sets the value of Rkey.
|
||||
func (s *MaUpdate) SetRkey(val OptString) {
|
||||
s.Rkey = val
|
||||
@ -4125,6 +4590,36 @@ func (s *MaUpdate) SetBskyURL(val OptString) {
|
||||
s.BskyURL = val
|
||||
}
|
||||
|
||||
// SetComment sets the value of Comment.
|
||||
func (s *MaUpdate) SetComment(val OptString) {
|
||||
s.Comment = val
|
||||
}
|
||||
|
||||
// SetBlog sets the value of Blog.
|
||||
func (s *MaUpdate) SetBlog(val OptString) {
|
||||
s.Blog = val
|
||||
}
|
||||
|
||||
// SetBlogURL sets the value of BlogURL.
|
||||
func (s *MaUpdate) SetBlogURL(val OptString) {
|
||||
s.BlogURL = val
|
||||
}
|
||||
|
||||
// SetDomain sets the value of Domain.
|
||||
func (s *MaUpdate) SetDomain(val OptString) {
|
||||
s.Domain = val
|
||||
}
|
||||
|
||||
// SetHost sets the value of Host.
|
||||
func (s *MaUpdate) SetHost(val OptString) {
|
||||
s.Host = val
|
||||
}
|
||||
|
||||
// SetFeed sets the value of Feed.
|
||||
func (s *MaUpdate) SetFeed(val OptString) {
|
||||
s.Feed = val
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the value of UpdatedAt.
|
||||
func (s *MaUpdate) SetUpdatedAt(val OptDateTime) {
|
||||
s.UpdatedAt = val
|
||||
@ -7166,8 +7661,17 @@ type UpdateMaReq struct {
|
||||
Avatar OptString `json:"avatar"`
|
||||
Cid OptString `json:"cid"`
|
||||
URI OptString `json:"uri"`
|
||||
CidRoot OptString `json:"cid_root"`
|
||||
URIRoot OptString `json:"uri_root"`
|
||||
Root OptString `json:"root"`
|
||||
Rkey OptString `json:"rkey"`
|
||||
BskyURL OptString `json:"bsky_url"`
|
||||
Comment OptString `json:"comment"`
|
||||
Blog OptString `json:"blog"`
|
||||
BlogURL OptString `json:"blog_url"`
|
||||
Domain OptString `json:"domain"`
|
||||
Host OptString `json:"host"`
|
||||
Feed OptString `json:"feed"`
|
||||
UpdatedAt OptDateTime `json:"updated_at"`
|
||||
Owner OptInt `json:"owner"`
|
||||
}
|
||||
@ -7217,6 +7721,21 @@ func (s *UpdateMaReq) GetURI() OptString {
|
||||
return s.URI
|
||||
}
|
||||
|
||||
// GetCidRoot returns the value of CidRoot.
|
||||
func (s *UpdateMaReq) GetCidRoot() OptString {
|
||||
return s.CidRoot
|
||||
}
|
||||
|
||||
// GetURIRoot returns the value of URIRoot.
|
||||
func (s *UpdateMaReq) GetURIRoot() OptString {
|
||||
return s.URIRoot
|
||||
}
|
||||
|
||||
// GetRoot returns the value of Root.
|
||||
func (s *UpdateMaReq) GetRoot() OptString {
|
||||
return s.Root
|
||||
}
|
||||
|
||||
// GetRkey returns the value of Rkey.
|
||||
func (s *UpdateMaReq) GetRkey() OptString {
|
||||
return s.Rkey
|
||||
@ -7227,6 +7746,36 @@ func (s *UpdateMaReq) GetBskyURL() OptString {
|
||||
return s.BskyURL
|
||||
}
|
||||
|
||||
// GetComment returns the value of Comment.
|
||||
func (s *UpdateMaReq) GetComment() OptString {
|
||||
return s.Comment
|
||||
}
|
||||
|
||||
// GetBlog returns the value of Blog.
|
||||
func (s *UpdateMaReq) GetBlog() OptString {
|
||||
return s.Blog
|
||||
}
|
||||
|
||||
// GetBlogURL returns the value of BlogURL.
|
||||
func (s *UpdateMaReq) GetBlogURL() OptString {
|
||||
return s.BlogURL
|
||||
}
|
||||
|
||||
// GetDomain returns the value of Domain.
|
||||
func (s *UpdateMaReq) GetDomain() OptString {
|
||||
return s.Domain
|
||||
}
|
||||
|
||||
// GetHost returns the value of Host.
|
||||
func (s *UpdateMaReq) GetHost() OptString {
|
||||
return s.Host
|
||||
}
|
||||
|
||||
// GetFeed returns the value of Feed.
|
||||
func (s *UpdateMaReq) GetFeed() OptString {
|
||||
return s.Feed
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the value of UpdatedAt.
|
||||
func (s *UpdateMaReq) GetUpdatedAt() OptDateTime {
|
||||
return s.UpdatedAt
|
||||
@ -7282,6 +7831,21 @@ func (s *UpdateMaReq) SetURI(val OptString) {
|
||||
s.URI = val
|
||||
}
|
||||
|
||||
// SetCidRoot sets the value of CidRoot.
|
||||
func (s *UpdateMaReq) SetCidRoot(val OptString) {
|
||||
s.CidRoot = val
|
||||
}
|
||||
|
||||
// SetURIRoot sets the value of URIRoot.
|
||||
func (s *UpdateMaReq) SetURIRoot(val OptString) {
|
||||
s.URIRoot = val
|
||||
}
|
||||
|
||||
// SetRoot sets the value of Root.
|
||||
func (s *UpdateMaReq) SetRoot(val OptString) {
|
||||
s.Root = val
|
||||
}
|
||||
|
||||
// SetRkey sets the value of Rkey.
|
||||
func (s *UpdateMaReq) SetRkey(val OptString) {
|
||||
s.Rkey = val
|
||||
@ -7292,6 +7856,36 @@ func (s *UpdateMaReq) SetBskyURL(val OptString) {
|
||||
s.BskyURL = val
|
||||
}
|
||||
|
||||
// SetComment sets the value of Comment.
|
||||
func (s *UpdateMaReq) SetComment(val OptString) {
|
||||
s.Comment = val
|
||||
}
|
||||
|
||||
// SetBlog sets the value of Blog.
|
||||
func (s *UpdateMaReq) SetBlog(val OptString) {
|
||||
s.Blog = val
|
||||
}
|
||||
|
||||
// SetBlogURL sets the value of BlogURL.
|
||||
func (s *UpdateMaReq) SetBlogURL(val OptString) {
|
||||
s.BlogURL = val
|
||||
}
|
||||
|
||||
// SetDomain sets the value of Domain.
|
||||
func (s *UpdateMaReq) SetDomain(val OptString) {
|
||||
s.Domain = val
|
||||
}
|
||||
|
||||
// SetHost sets the value of Host.
|
||||
func (s *UpdateMaReq) SetHost(val OptString) {
|
||||
s.Host = val
|
||||
}
|
||||
|
||||
// SetFeed sets the value of Feed.
|
||||
func (s *UpdateMaReq) SetFeed(val OptString) {
|
||||
s.Feed = val
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the value of UpdatedAt.
|
||||
func (s *UpdateMaReq) SetUpdatedAt(val OptDateTime) {
|
||||
s.UpdatedAt = val
|
||||
@ -9393,8 +9987,17 @@ type UserMaList struct {
|
||||
Avatar OptString `json:"avatar"`
|
||||
Cid OptString `json:"cid"`
|
||||
URI OptString `json:"uri"`
|
||||
CidRoot OptString `json:"cid_root"`
|
||||
URIRoot OptString `json:"uri_root"`
|
||||
Root OptString `json:"root"`
|
||||
Rkey OptString `json:"rkey"`
|
||||
BskyURL OptString `json:"bsky_url"`
|
||||
Comment OptString `json:"comment"`
|
||||
Blog OptString `json:"blog"`
|
||||
BlogURL OptString `json:"blog_url"`
|
||||
Domain OptString `json:"domain"`
|
||||
Host OptString `json:"host"`
|
||||
Feed OptString `json:"feed"`
|
||||
UpdatedAt OptDateTime `json:"updated_at"`
|
||||
CreatedAt OptDateTime `json:"created_at"`
|
||||
}
|
||||
@ -9444,6 +10047,21 @@ func (s *UserMaList) GetURI() OptString {
|
||||
return s.URI
|
||||
}
|
||||
|
||||
// GetCidRoot returns the value of CidRoot.
|
||||
func (s *UserMaList) GetCidRoot() OptString {
|
||||
return s.CidRoot
|
||||
}
|
||||
|
||||
// GetURIRoot returns the value of URIRoot.
|
||||
func (s *UserMaList) GetURIRoot() OptString {
|
||||
return s.URIRoot
|
||||
}
|
||||
|
||||
// GetRoot returns the value of Root.
|
||||
func (s *UserMaList) GetRoot() OptString {
|
||||
return s.Root
|
||||
}
|
||||
|
||||
// GetRkey returns the value of Rkey.
|
||||
func (s *UserMaList) GetRkey() OptString {
|
||||
return s.Rkey
|
||||
@ -9454,6 +10072,36 @@ func (s *UserMaList) GetBskyURL() OptString {
|
||||
return s.BskyURL
|
||||
}
|
||||
|
||||
// GetComment returns the value of Comment.
|
||||
func (s *UserMaList) GetComment() OptString {
|
||||
return s.Comment
|
||||
}
|
||||
|
||||
// GetBlog returns the value of Blog.
|
||||
func (s *UserMaList) GetBlog() OptString {
|
||||
return s.Blog
|
||||
}
|
||||
|
||||
// GetBlogURL returns the value of BlogURL.
|
||||
func (s *UserMaList) GetBlogURL() OptString {
|
||||
return s.BlogURL
|
||||
}
|
||||
|
||||
// GetDomain returns the value of Domain.
|
||||
func (s *UserMaList) GetDomain() OptString {
|
||||
return s.Domain
|
||||
}
|
||||
|
||||
// GetHost returns the value of Host.
|
||||
func (s *UserMaList) GetHost() OptString {
|
||||
return s.Host
|
||||
}
|
||||
|
||||
// GetFeed returns the value of Feed.
|
||||
func (s *UserMaList) GetFeed() OptString {
|
||||
return s.Feed
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the value of UpdatedAt.
|
||||
func (s *UserMaList) GetUpdatedAt() OptDateTime {
|
||||
return s.UpdatedAt
|
||||
@ -9509,6 +10157,21 @@ func (s *UserMaList) SetURI(val OptString) {
|
||||
s.URI = val
|
||||
}
|
||||
|
||||
// SetCidRoot sets the value of CidRoot.
|
||||
func (s *UserMaList) SetCidRoot(val OptString) {
|
||||
s.CidRoot = val
|
||||
}
|
||||
|
||||
// SetURIRoot sets the value of URIRoot.
|
||||
func (s *UserMaList) SetURIRoot(val OptString) {
|
||||
s.URIRoot = val
|
||||
}
|
||||
|
||||
// SetRoot sets the value of Root.
|
||||
func (s *UserMaList) SetRoot(val OptString) {
|
||||
s.Root = val
|
||||
}
|
||||
|
||||
// SetRkey sets the value of Rkey.
|
||||
func (s *UserMaList) SetRkey(val OptString) {
|
||||
s.Rkey = val
|
||||
@ -9519,6 +10182,36 @@ func (s *UserMaList) SetBskyURL(val OptString) {
|
||||
s.BskyURL = val
|
||||
}
|
||||
|
||||
// SetComment sets the value of Comment.
|
||||
func (s *UserMaList) SetComment(val OptString) {
|
||||
s.Comment = val
|
||||
}
|
||||
|
||||
// SetBlog sets the value of Blog.
|
||||
func (s *UserMaList) SetBlog(val OptString) {
|
||||
s.Blog = val
|
||||
}
|
||||
|
||||
// SetBlogURL sets the value of BlogURL.
|
||||
func (s *UserMaList) SetBlogURL(val OptString) {
|
||||
s.BlogURL = val
|
||||
}
|
||||
|
||||
// SetDomain sets the value of Domain.
|
||||
func (s *UserMaList) SetDomain(val OptString) {
|
||||
s.Domain = val
|
||||
}
|
||||
|
||||
// SetHost sets the value of Host.
|
||||
func (s *UserMaList) SetHost(val OptString) {
|
||||
s.Host = val
|
||||
}
|
||||
|
||||
// SetFeed sets the value of Feed.
|
||||
func (s *UserMaList) SetFeed(val OptString) {
|
||||
s.Feed = val
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the value of UpdatedAt.
|
||||
func (s *UserMaList) SetUpdatedAt(val OptDateTime) {
|
||||
s.UpdatedAt = val
|
||||
|
@ -539,6 +539,33 @@ func (h *OgentHandler) CreateMa(ctx context.Context, req *CreateMaReq) (CreateMa
|
||||
if v, ok := req.BskyURL.Get(); ok {
|
||||
b.SetBskyURL(v)
|
||||
}
|
||||
if v, ok := req.CidRoot.Get(); ok {
|
||||
b.SetCidRoot(v)
|
||||
}
|
||||
if v, ok := req.URIRoot.Get(); ok {
|
||||
b.SetURIRoot(v)
|
||||
}
|
||||
if v, ok := req.Root.Get(); ok {
|
||||
b.SetRoot(v)
|
||||
}
|
||||
if v, ok := req.Comment.Get(); ok {
|
||||
b.SetComment(v)
|
||||
}
|
||||
if v, ok := req.Blog.Get(); ok {
|
||||
b.SetBlog(v)
|
||||
}
|
||||
if v, ok := req.BlogURL.Get(); ok {
|
||||
b.SetBlogURL(v)
|
||||
}
|
||||
if v, ok := req.Domain.Get(); ok {
|
||||
b.SetDomain(v)
|
||||
}
|
||||
if v, ok := req.Host.Get(); ok {
|
||||
b.SetHost(v)
|
||||
}
|
||||
if v, ok := req.Feed.Get(); ok {
|
||||
b.SetFeed(v)
|
||||
}
|
||||
if v, ok := req.UpdatedAt.Get(); ok {
|
||||
b.SetUpdatedAt(v)
|
||||
}
|
||||
@ -646,6 +673,33 @@ func (h *OgentHandler) UpdateMa(ctx context.Context, req *UpdateMaReq, params Up
|
||||
if v, ok := req.BskyURL.Get(); ok {
|
||||
b.SetBskyURL(v)
|
||||
}
|
||||
if v, ok := req.CidRoot.Get(); ok {
|
||||
b.SetCidRoot(v)
|
||||
}
|
||||
if v, ok := req.URIRoot.Get(); ok {
|
||||
b.SetURIRoot(v)
|
||||
}
|
||||
if v, ok := req.Root.Get(); ok {
|
||||
b.SetRoot(v)
|
||||
}
|
||||
if v, ok := req.Comment.Get(); ok {
|
||||
b.SetComment(v)
|
||||
}
|
||||
if v, ok := req.Blog.Get(); ok {
|
||||
b.SetBlog(v)
|
||||
}
|
||||
if v, ok := req.BlogURL.Get(); ok {
|
||||
b.SetBlogURL(v)
|
||||
}
|
||||
if v, ok := req.Domain.Get(); ok {
|
||||
b.SetDomain(v)
|
||||
}
|
||||
if v, ok := req.Host.Get(); ok {
|
||||
b.SetHost(v)
|
||||
}
|
||||
if v, ok := req.Feed.Get(); ok {
|
||||
b.SetFeed(v)
|
||||
}
|
||||
if v, ok := req.UpdatedAt.Get(); ok {
|
||||
b.SetUpdatedAt(v)
|
||||
}
|
||||
|
@ -420,8 +420,17 @@ func NewMaCreate(e *ent.Ma) *MaCreate {
|
||||
ret.Avatar = NewOptString(e.Avatar)
|
||||
ret.Cid = NewOptString(e.Cid)
|
||||
ret.URI = NewOptString(e.URI)
|
||||
ret.CidRoot = NewOptString(e.CidRoot)
|
||||
ret.URIRoot = NewOptString(e.URIRoot)
|
||||
ret.Root = NewOptString(e.Root)
|
||||
ret.Rkey = NewOptString(e.Rkey)
|
||||
ret.BskyURL = NewOptString(e.BskyURL)
|
||||
ret.Comment = NewOptString(e.Comment)
|
||||
ret.Blog = NewOptString(e.Blog)
|
||||
ret.BlogURL = NewOptString(e.BlogURL)
|
||||
ret.Domain = NewOptString(e.Domain)
|
||||
ret.Host = NewOptString(e.Host)
|
||||
ret.Feed = NewOptString(e.Feed)
|
||||
ret.UpdatedAt = NewOptDateTime(e.UpdatedAt)
|
||||
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
||||
return &ret
|
||||
@ -459,8 +468,17 @@ func NewMaList(e *ent.Ma) *MaList {
|
||||
ret.Avatar = NewOptString(e.Avatar)
|
||||
ret.Cid = NewOptString(e.Cid)
|
||||
ret.URI = NewOptString(e.URI)
|
||||
ret.CidRoot = NewOptString(e.CidRoot)
|
||||
ret.URIRoot = NewOptString(e.URIRoot)
|
||||
ret.Root = NewOptString(e.Root)
|
||||
ret.Rkey = NewOptString(e.Rkey)
|
||||
ret.BskyURL = NewOptString(e.BskyURL)
|
||||
ret.Comment = NewOptString(e.Comment)
|
||||
ret.Blog = NewOptString(e.Blog)
|
||||
ret.BlogURL = NewOptString(e.BlogURL)
|
||||
ret.Domain = NewOptString(e.Domain)
|
||||
ret.Host = NewOptString(e.Host)
|
||||
ret.Feed = NewOptString(e.Feed)
|
||||
ret.UpdatedAt = NewOptDateTime(e.UpdatedAt)
|
||||
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
||||
return &ret
|
||||
@ -498,8 +516,17 @@ func NewMaRead(e *ent.Ma) *MaRead {
|
||||
ret.Avatar = NewOptString(e.Avatar)
|
||||
ret.Cid = NewOptString(e.Cid)
|
||||
ret.URI = NewOptString(e.URI)
|
||||
ret.CidRoot = NewOptString(e.CidRoot)
|
||||
ret.URIRoot = NewOptString(e.URIRoot)
|
||||
ret.Root = NewOptString(e.Root)
|
||||
ret.Rkey = NewOptString(e.Rkey)
|
||||
ret.BskyURL = NewOptString(e.BskyURL)
|
||||
ret.Comment = NewOptString(e.Comment)
|
||||
ret.Blog = NewOptString(e.Blog)
|
||||
ret.BlogURL = NewOptString(e.BlogURL)
|
||||
ret.Domain = NewOptString(e.Domain)
|
||||
ret.Host = NewOptString(e.Host)
|
||||
ret.Feed = NewOptString(e.Feed)
|
||||
ret.UpdatedAt = NewOptDateTime(e.UpdatedAt)
|
||||
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
||||
return &ret
|
||||
@ -537,8 +564,17 @@ func NewMaUpdate(e *ent.Ma) *MaUpdate {
|
||||
ret.Avatar = NewOptString(e.Avatar)
|
||||
ret.Cid = NewOptString(e.Cid)
|
||||
ret.URI = NewOptString(e.URI)
|
||||
ret.CidRoot = NewOptString(e.CidRoot)
|
||||
ret.URIRoot = NewOptString(e.URIRoot)
|
||||
ret.Root = NewOptString(e.Root)
|
||||
ret.Rkey = NewOptString(e.Rkey)
|
||||
ret.BskyURL = NewOptString(e.BskyURL)
|
||||
ret.Comment = NewOptString(e.Comment)
|
||||
ret.Blog = NewOptString(e.Blog)
|
||||
ret.BlogURL = NewOptString(e.BlogURL)
|
||||
ret.Domain = NewOptString(e.Domain)
|
||||
ret.Host = NewOptString(e.Host)
|
||||
ret.Feed = NewOptString(e.Feed)
|
||||
ret.UpdatedAt = NewOptDateTime(e.UpdatedAt)
|
||||
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
||||
return &ret
|
||||
@ -1460,8 +1496,17 @@ func NewUserMaList(e *ent.Ma) *UserMaList {
|
||||
ret.Avatar = NewOptString(e.Avatar)
|
||||
ret.Cid = NewOptString(e.Cid)
|
||||
ret.URI = NewOptString(e.URI)
|
||||
ret.CidRoot = NewOptString(e.CidRoot)
|
||||
ret.URIRoot = NewOptString(e.URIRoot)
|
||||
ret.Root = NewOptString(e.Root)
|
||||
ret.Rkey = NewOptString(e.Rkey)
|
||||
ret.BskyURL = NewOptString(e.BskyURL)
|
||||
ret.Comment = NewOptString(e.Comment)
|
||||
ret.Blog = NewOptString(e.Blog)
|
||||
ret.BlogURL = NewOptString(e.BlogURL)
|
||||
ret.Domain = NewOptString(e.Domain)
|
||||
ret.Host = NewOptString(e.Host)
|
||||
ret.Feed = NewOptString(e.Feed)
|
||||
ret.UpdatedAt = NewOptDateTime(e.UpdatedAt)
|
||||
ret.CreatedAt = NewOptDateTime(e.CreatedAt)
|
||||
return &ret
|
||||
|
216
ent/openapi.json
216
ent/openapi.json
@ -805,12 +805,39 @@
|
||||
"uri": {
|
||||
"type": "string"
|
||||
},
|
||||
"cid_root": {
|
||||
"type": "string"
|
||||
},
|
||||
"uri_root": {
|
||||
"type": "string"
|
||||
},
|
||||
"root": {
|
||||
"type": "string"
|
||||
},
|
||||
"rkey": {
|
||||
"type": "string"
|
||||
},
|
||||
"bsky_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"comment": {
|
||||
"type": "string"
|
||||
},
|
||||
"blog": {
|
||||
"type": "string"
|
||||
},
|
||||
"blog_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"domain": {
|
||||
"type": "string"
|
||||
},
|
||||
"host": {
|
||||
"type": "string"
|
||||
},
|
||||
"feed": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
@ -987,12 +1014,39 @@
|
||||
"uri": {
|
||||
"type": "string"
|
||||
},
|
||||
"cid_root": {
|
||||
"type": "string"
|
||||
},
|
||||
"uri_root": {
|
||||
"type": "string"
|
||||
},
|
||||
"root": {
|
||||
"type": "string"
|
||||
},
|
||||
"rkey": {
|
||||
"type": "string"
|
||||
},
|
||||
"bsky_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"comment": {
|
||||
"type": "string"
|
||||
},
|
||||
"blog": {
|
||||
"type": "string"
|
||||
},
|
||||
"blog_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"domain": {
|
||||
"type": "string"
|
||||
},
|
||||
"host": {
|
||||
"type": "string"
|
||||
},
|
||||
"feed": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
@ -3366,12 +3420,39 @@
|
||||
"uri": {
|
||||
"type": "string"
|
||||
},
|
||||
"cid_root": {
|
||||
"type": "string"
|
||||
},
|
||||
"uri_root": {
|
||||
"type": "string"
|
||||
},
|
||||
"root": {
|
||||
"type": "string"
|
||||
},
|
||||
"rkey": {
|
||||
"type": "string"
|
||||
},
|
||||
"bsky_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"comment": {
|
||||
"type": "string"
|
||||
},
|
||||
"blog": {
|
||||
"type": "string"
|
||||
},
|
||||
"blog_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"domain": {
|
||||
"type": "string"
|
||||
},
|
||||
"host": {
|
||||
"type": "string"
|
||||
},
|
||||
"feed": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
@ -3420,12 +3501,39 @@
|
||||
"uri": {
|
||||
"type": "string"
|
||||
},
|
||||
"cid_root": {
|
||||
"type": "string"
|
||||
},
|
||||
"uri_root": {
|
||||
"type": "string"
|
||||
},
|
||||
"root": {
|
||||
"type": "string"
|
||||
},
|
||||
"rkey": {
|
||||
"type": "string"
|
||||
},
|
||||
"bsky_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"comment": {
|
||||
"type": "string"
|
||||
},
|
||||
"blog": {
|
||||
"type": "string"
|
||||
},
|
||||
"blog_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"domain": {
|
||||
"type": "string"
|
||||
},
|
||||
"host": {
|
||||
"type": "string"
|
||||
},
|
||||
"feed": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
@ -3469,12 +3577,39 @@
|
||||
"uri": {
|
||||
"type": "string"
|
||||
},
|
||||
"cid_root": {
|
||||
"type": "string"
|
||||
},
|
||||
"uri_root": {
|
||||
"type": "string"
|
||||
},
|
||||
"root": {
|
||||
"type": "string"
|
||||
},
|
||||
"rkey": {
|
||||
"type": "string"
|
||||
},
|
||||
"bsky_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"comment": {
|
||||
"type": "string"
|
||||
},
|
||||
"blog": {
|
||||
"type": "string"
|
||||
},
|
||||
"blog_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"domain": {
|
||||
"type": "string"
|
||||
},
|
||||
"host": {
|
||||
"type": "string"
|
||||
},
|
||||
"feed": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
@ -3518,12 +3653,39 @@
|
||||
"uri": {
|
||||
"type": "string"
|
||||
},
|
||||
"cid_root": {
|
||||
"type": "string"
|
||||
},
|
||||
"uri_root": {
|
||||
"type": "string"
|
||||
},
|
||||
"root": {
|
||||
"type": "string"
|
||||
},
|
||||
"rkey": {
|
||||
"type": "string"
|
||||
},
|
||||
"bsky_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"comment": {
|
||||
"type": "string"
|
||||
},
|
||||
"blog": {
|
||||
"type": "string"
|
||||
},
|
||||
"blog_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"domain": {
|
||||
"type": "string"
|
||||
},
|
||||
"host": {
|
||||
"type": "string"
|
||||
},
|
||||
"feed": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
@ -3567,12 +3729,39 @@
|
||||
"uri": {
|
||||
"type": "string"
|
||||
},
|
||||
"cid_root": {
|
||||
"type": "string"
|
||||
},
|
||||
"uri_root": {
|
||||
"type": "string"
|
||||
},
|
||||
"root": {
|
||||
"type": "string"
|
||||
},
|
||||
"rkey": {
|
||||
"type": "string"
|
||||
},
|
||||
"bsky_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"comment": {
|
||||
"type": "string"
|
||||
},
|
||||
"blog": {
|
||||
"type": "string"
|
||||
},
|
||||
"blog_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"domain": {
|
||||
"type": "string"
|
||||
},
|
||||
"host": {
|
||||
"type": "string"
|
||||
},
|
||||
"feed": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
@ -5563,12 +5752,39 @@
|
||||
"uri": {
|
||||
"type": "string"
|
||||
},
|
||||
"cid_root": {
|
||||
"type": "string"
|
||||
},
|
||||
"uri_root": {
|
||||
"type": "string"
|
||||
},
|
||||
"root": {
|
||||
"type": "string"
|
||||
},
|
||||
"rkey": {
|
||||
"type": "string"
|
||||
},
|
||||
"bsky_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"comment": {
|
||||
"type": "string"
|
||||
},
|
||||
"blog": {
|
||||
"type": "string"
|
||||
},
|
||||
"blog_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"domain": {
|
||||
"type": "string"
|
||||
},
|
||||
"host": {
|
||||
"type": "string"
|
||||
},
|
||||
"feed": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
|
@ -64,7 +64,7 @@ func init() {
|
||||
// ma.DefaultLimit holds the default value on creation for the limit field.
|
||||
ma.DefaultLimit = maDescLimit.Default.(bool)
|
||||
// maDescCreatedAt is the schema descriptor for created_at field.
|
||||
maDescCreatedAt := maFields[13].Descriptor()
|
||||
maDescCreatedAt := maFields[22].Descriptor()
|
||||
// ma.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
ma.DefaultCreatedAt = maDescCreatedAt.Default.(func() time.Time)
|
||||
sevFields := schema.Sev{}.Fields()
|
||||
|
@ -49,12 +49,39 @@ func (Ma) Fields() []ent.Field {
|
||||
field.String("uri").
|
||||
Optional(),
|
||||
|
||||
field.String("cid_root").
|
||||
Optional(),
|
||||
|
||||
field.String("uri_root").
|
||||
Optional(),
|
||||
|
||||
field.String("root").
|
||||
Optional(),
|
||||
|
||||
field.String("rkey").
|
||||
Optional(),
|
||||
|
||||
field.String("bsky_url").
|
||||
Optional(),
|
||||
|
||||
field.String("comment").
|
||||
Optional(),
|
||||
|
||||
field.String("blog").
|
||||
Optional(),
|
||||
|
||||
field.String("blog_url").
|
||||
Optional(),
|
||||
|
||||
field.String("domain").
|
||||
Optional(),
|
||||
|
||||
field.String("host").
|
||||
Optional(),
|
||||
|
||||
field.String("feed").
|
||||
Optional(),
|
||||
|
||||
field.Time("updated_at").
|
||||
Optional(),
|
||||
|
||||
|
22
tmp/northflank.zsh
Executable file
22
tmp/northflank.zsh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/zsh
|
||||
|
||||
pass=`cat ~/.config/ai/api_card.json|jq -r .gitea_token`
|
||||
/usr/bin/northflank exec service --project ent --service web --cmd "/app/data/api/backup.sh $pass"
|
||||
|
||||
function f(){
|
||||
rm /app/data/api/backup.sh
|
||||
echo '#!/bin/bash
|
||||
pass=$1
|
||||
git config --global user.email syui@syui.ai
|
||||
git config --global user.name syui
|
||||
cp -rf /app/data/new.sqlite /app/data/api/latest.sqlite
|
||||
cp -rf /app/data/new.sqlite /app/data/api/`date '+%w'`.sqlite
|
||||
cd /app/data/api
|
||||
git remote add origin https://$pass@git.syui.ai/ai/api_sqlite
|
||||
git add .
|
||||
git commit -m backup
|
||||
git push origin main
|
||||
git remote rm origin
|
||||
' >> /app/data/api/backup.sh
|
||||
chmod +x /app/data/api/backup.sh
|
||||
}
|
@ -539,6 +539,33 @@ func (h *OgentHandler) CreateMa(ctx context.Context, req *CreateMaReq) (CreateMa
|
||||
if v, ok := req.BskyURL.Get(); ok {
|
||||
b.SetBskyURL(v)
|
||||
}
|
||||
if v, ok := req.CidRoot.Get(); ok {
|
||||
b.SetCidRoot(v)
|
||||
}
|
||||
if v, ok := req.URIRoot.Get(); ok {
|
||||
b.SetURIRoot(v)
|
||||
}
|
||||
if v, ok := req.Root.Get(); ok {
|
||||
b.SetRoot(v)
|
||||
}
|
||||
if v, ok := req.Comment.Get(); ok {
|
||||
b.SetComment(v)
|
||||
}
|
||||
if v, ok := req.Blog.Get(); ok {
|
||||
b.SetBlog(v)
|
||||
}
|
||||
if v, ok := req.BlogURL.Get(); ok {
|
||||
b.SetBlogURL(v)
|
||||
}
|
||||
if v, ok := req.Domain.Get(); ok {
|
||||
b.SetDomain(v)
|
||||
}
|
||||
if v, ok := req.Host.Get(); ok {
|
||||
b.SetHost(v)
|
||||
}
|
||||
if v, ok := req.Feed.Get(); ok {
|
||||
b.SetFeed(v)
|
||||
}
|
||||
if v, ok := req.UpdatedAt.Get(); ok {
|
||||
b.SetUpdatedAt(v)
|
||||
}
|
||||
@ -646,6 +673,33 @@ func (h *OgentHandler) UpdateMa(ctx context.Context, req *UpdateMaReq, params Up
|
||||
if v, ok := req.BskyURL.Get(); ok {
|
||||
b.SetBskyURL(v)
|
||||
}
|
||||
if v, ok := req.CidRoot.Get(); ok {
|
||||
b.SetCidRoot(v)
|
||||
}
|
||||
if v, ok := req.URIRoot.Get(); ok {
|
||||
b.SetURIRoot(v)
|
||||
}
|
||||
if v, ok := req.Root.Get(); ok {
|
||||
b.SetRoot(v)
|
||||
}
|
||||
if v, ok := req.Comment.Get(); ok {
|
||||
b.SetComment(v)
|
||||
}
|
||||
if v, ok := req.Blog.Get(); ok {
|
||||
b.SetBlog(v)
|
||||
}
|
||||
if v, ok := req.BlogURL.Get(); ok {
|
||||
b.SetBlogURL(v)
|
||||
}
|
||||
if v, ok := req.Domain.Get(); ok {
|
||||
b.SetDomain(v)
|
||||
}
|
||||
if v, ok := req.Host.Get(); ok {
|
||||
b.SetHost(v)
|
||||
}
|
||||
if v, ok := req.Feed.Get(); ok {
|
||||
b.SetFeed(v)
|
||||
}
|
||||
if v, ok := req.UpdatedAt.Get(); ok {
|
||||
b.SetUpdatedAt(v)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user