Set Trash colums in models to default to false

This commit is contained in:
Abin Simon
2022-01-12 17:35:38 +05:30
parent 4e77e0495c
commit 7bbc1541f8
9 changed files with 9 additions and 9 deletions
@@ -15,7 +15,7 @@ type AccountResourcerole struct {
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"`
Trash bool `bun:"trash,notnull,default:false"`
Default bool `bun:"default,notnull"`
OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
PartnerId uuid.UUID `bun:"partner_id,type:uuid"`
@@ -15,7 +15,7 @@ type Group struct {
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"`
Trash bool `bun:"trash,notnull,default:false"`
OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
PartnerId uuid.UUID `bun:"partner_id,type:uuid"`
Type string `bun:"type,notnull"`
@@ -15,7 +15,7 @@ type GroupAccount struct {
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"`
Trash bool `bun:"trash,notnull,default:false"`
// OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
// PartnerId uuid.UUID `bun:"partner_id,type:uuid"`
AccountId uuid.UUID `bun:"account_id,type:uuid"`
@@ -15,7 +15,7 @@ type GroupRole struct {
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"`
Trash bool `bun:"trash,notnull,default:false"`
Default bool `bun:"default,notnull"`
OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
PartnerId uuid.UUID `bun:"partner_id,type:uuid"`
@@ -15,7 +15,7 @@ type ProjectAccountNamespaceRole struct {
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"`
Trash bool `bun:"trash,notnull,default:false"`
OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
PartnerId uuid.UUID `bun:"partner_id,type:uuid"`
RoleId uuid.UUID `bun:"role_id,type:uuid"`
@@ -15,7 +15,7 @@ type ProjectAccountResourcerole struct {
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"`
Trash bool `bun:"trash,notnull,default:false"`
Default bool `bun:"default,notnull"`
OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
PartnerId uuid.UUID `bun:"partner_id,type:uuid"`
@@ -15,7 +15,7 @@ type ProjectGroupNamespaceRole struct {
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"`
Trash bool `bun:"trash,notnull,default:false"`
OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
PartnerId uuid.UUID `bun:"partner_id,type:uuid"`
RoleId uuid.UUID `bun:"role_id,type:uuid"`
@@ -15,7 +15,7 @@ type ProjectGroupRole struct {
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"`
Trash bool `bun:"trash,notnull,default:false"`
Default bool `bun:"default,notnull"`
OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
PartnerId uuid.UUID `bun:"partner_id,type:uuid"`
@@ -15,7 +15,7 @@ type Role struct {
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"`
Trash bool `bun:"trash,notnull,default:false"`
OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
PartnerId uuid.UUID `bun:"partner_id,type:uuid"`
IsGlobal bool `bun:"is_global,notnull"`