mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-24 17:11:49 +00:00
feat: is_admin column
This commit is contained in:
parent
9a422a17cd
commit
28b1058752
2 changed files with 3 additions and 0 deletions
|
|
@ -22,6 +22,7 @@ pub struct Model {
|
|||
pub personal_identification_number_hash: Option<String>,
|
||||
pub public_key: String,
|
||||
pub private_key: String,
|
||||
pub is_admin: bool,
|
||||
pub created_at: DateTime,
|
||||
pub updated_at: DateTime,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ impl MigrationTrait for Migration {
|
|||
.col(ColumnDef::new(Candidate::PersonalIdentificationNumberHash).text())
|
||||
.col(ColumnDef::new(Candidate::PublicKey).string().not_null())
|
||||
.col(ColumnDef::new(Candidate::PrivateKey).string().not_null())
|
||||
.col(ColumnDef::new(Candidate::IsAdmin).boolean().not_null().default(false))
|
||||
.col(ColumnDef::new(Candidate::CreatedAt).date_time().not_null())
|
||||
.col(ColumnDef::new(Candidate::UpdatedAt).date_time().not_null())
|
||||
.to_owned(),
|
||||
|
|
@ -68,6 +69,7 @@ pub enum Candidate {
|
|||
PersonalIdentificationNumberHash,
|
||||
PublicKey,
|
||||
PrivateKey,
|
||||
IsAdmin,
|
||||
CreatedAt,
|
||||
UpdatedAt,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue