Files
paralus/internal/models/organization.go
nirav-rafay c66bdc25cd restructure rcloud-base as a single base controller (#37)
* restructure rcloud-base as a single base controller
* updated master.rest
* moved sentry from internal to pkg as it is used by relay
* removing unused rpc and it's dependencies
* Fix usermgmt tests
* Don't redefine variables in rest file
Co-authored-by: Abin Simon <abin.simon@rafay.co>
2022-03-03 17:59:06 +05:30

42 lines
2.2 KiB
Go

package models
import (
"encoding/json"
"time"
"github.com/google/uuid"
"github.com/uptrace/bun"
)
type Organization struct {
bun.BaseModel `bun:"table:authsrv_organization,alias:organization"`
ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
Name string `bun:"name,notnull"`
Description string `bun:"description,notnull"`
CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"`
ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"`
Trash bool `bun:"trash,notnull"`
Settings json.RawMessage `bun:"settings,notnull,type:jsonb"`
BillingAddress string `bun:"billing_address,notnull,type:text"`
PartnerId uuid.UUID `bun:"partner_id,notnull,type:uuid"`
Active bool `bun:"active,notnull"`
Approved bool `bun:"approved,notnull"`
Type string `bun:"type,notnull"`
AddressLine1 string `bun:"address_line1,notnull,type:text"`
AddressLine2 string `bun:"address_line2,notnull,type:text"`
City string `bun:"city,notnull,type:text"`
Country string `bun:"country,notnull,type:text"`
Phone string `bun:"phone,notnull,type:text"`
State string `bun:"state,notnull,type:text"`
Zipcode string `bun:"zipcode,notnull,type:text"`
DeletedName string `bun:"deleted_name"`
IsPrivate bool `bun:"is_private"`
IsTOTPEnabled bool `bun:"is_totp_enabled,notnull"`
AreClustersShared bool `bun:"are_clusters_shared,notnull"`
PspsEnabled bool `bun:"psps_enabled,default:true"`
CustomPspsEnabled bool `bun:"custom_psps_enabled"`
DefaultBlueprintsEnabled bool `bun:"default_blueprints_enabled,default:true"`
Referer string `bun:"referer"`
}