package models import "time" const ( AuthAppTypeWeb = 1 AuthAppTypeSPA = 2 AuthAppTypeNative = 3 AuthAppTypeMiniProg = 4 ) const ( AuthRealmTenant = "tenant" AuthRealmPlatform = "platform" ) type AuthClient struct { ID uint64 `orm:"column(id);pk;auto" json:"id"` ClientID string `orm:"column(client_id);size(64)" json:"client_id"` ClientSecret *string `orm:"column(client_secret);size(128);null" json:"-"` AppCode string `orm:"column(app_code);size(32)" json:"app_code"` Name string `orm:"column(name);size(128)" json:"name"` AppType int8 `orm:"column(app_type);default(1)" json:"app_type"` RedirectURIs *string `orm:"column(redirect_uris);type(text);null" json:"redirect_uris"` PostLogoutURIs *string `orm:"column(post_logout_uris);type(text);null" json:"post_logout_uris"` BackchannelLogoutURI *string `orm:"column(backchannel_logout_uri);size(500);null" json:"backchannel_logout_uri"` GrantTypes string `orm:"column(grant_types);size(255)" json:"grant_types"` Scope *string `orm:"column(scope);size(255);null" json:"scope"` AccessTTL int `orm:"column(access_ttl);default(1800)" json:"access_ttl"` RefreshTTL int `orm:"column(refresh_ttl);default(2592000)" json:"refresh_ttl"` Realm string `orm:"column(realm);size(16);default(tenant)" json:"realm"` Status int8 `orm:"column(status);default(1)" json:"status"` CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"` UpdateTime *time.Time `orm:"column(update_time);type(datetime);null" json:"update_time"` } func (m *AuthClient) TableName() string { return "yz_auth_client" }